Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* in main */
- MyApp.userDefaults.defaults({
- "MyApp:searches": [
- {'query': 'Foo', 'count': 99}
- ,{'query': 'Bar', 'count': 0}
- ]
- }
- });
- /* Array Controller */
- MyApp.searchController = SC.ArrayController.create({
- contentBinding: SC.Binding.oneWay(MyApp.userDefaults.getPath('MyApp:searches'))
- });
- /* in the list view */
- ,contentBinding: "MyApp.searchController.arrangedObjects"
- ,contentValueKey: "query"
- ,contentUnreadCountKey: "count"
Add Comment
Please, Sign In to add comment