Skip to content

Instantly share code, notes, and snippets.

@jfahrenkrug
Created September 8, 2009 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfahrenkrug/182930 to your computer and use it in GitHub Desktop.
Save jfahrenkrug/182930 to your computer and use it in GitHub Desktop.
@import <Foundation/CPObject.j>
@import "Location.j"
@import "DemoData.j"
@implementation LocationsController : CPObject
{
CPArray locations;
}
- (void)setLocations:(CPArray)someLocations {
locations = someLocations;
}
- (TripDay)locations {
return locations;
}
- (void)loadExampleLocations {
var json = [[DemoData exampleJSONString] objectFromJSON];
[self setLocations:[Location locationsFromJSONObjects:json]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment