Skip to content
Browse files

Merge pull request #2 from enriquez/master

Minor tweaks of obj-c code
  • Loading branch information...
2 parents e857e6f + 693f5cb commit 7001981d09cd29e4d0188e9017eff85f90a0ffb9 @al2o3cr committed Aug 21, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 index.html
View
10 index.html
@@ -38,15 +38,15 @@
<% var index = 0; %>
<% var coefficients = _.map(_.range(data.length), function(num) { return "coef" + num }); %>
<% _.each(data, function(row) { %>
-<%= coefficients[index] + " = " + "[NSArray initWithObjects:\n" +
- " [NSNumber " + row[0] + " floatValue],\n" +
- " [NSArray initWithObjects:\n" +
+<%= "NSArray *" + coefficients[index] + " = " + "[NSArray arrayWithObjects:\n" +
+ " [NSNumber numberWithFloat:" + row[0] + "],\n" +
+ " [NSArray arrayWithObjects:\n" +
_.map(row[1], function(num) {
- return " [NSNumber " + num + " floatValue]";
+ return " [NSNumber numberWithFloat:" + num + "]";
}).join(",\n").concat(", nil], nil];") %>
<% index++; %>
<% }) %>
-<%= "[[NSArray alloc] initWithObjects:" + coefficients.join(", ").concat(", nil];") %>
+<%= "NSArray *coefficients = [NSArray arrayWithObjects:" + coefficients.join(", ").concat(", nil];") %>
</script>
</head>
<body>

0 comments on commit 7001981

Please sign in to comment.
Something went wrong with that request. Please try again.