Browse files

Minor tweaks of obj-c code

  • Loading branch information...
1 parent e857e6f commit 693f5cb5fe5b6a229a2c3e93ff626dc3a34fbb0d @enriquez committed Jul 16, 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 693f5cb

Please sign in to comment.