Skip to content

Loading…

Minor tweaks of obj-c code #2

Merged
merged 1 commit into from

2 participants

@enriquez

No description provided.

@al2o3cr al2o3cr merged commit 7001981 into al2o3cr:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2012
  1. @enriquez

    Minor tweaks of obj-c code

    enriquez committed
This page is out of date. Refresh to see the latest.
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>
Something went wrong with that request. Please try again.