Guest User

Untitled

a guest
Jun 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. /* in main */
  2.  
  3. MyApp.userDefaults.defaults({
  4. "MyApp:searches": [
  5. {'query': 'Foo', 'count': 99}
  6. ,{'query': 'Bar', 'count': 0}
  7. ]
  8. }
  9. });
  10.  
  11. /* Array Controller */
  12. MyApp.searchController = SC.ArrayController.create({
  13. contentBinding: SC.Binding.oneWay(MyApp.userDefaults.getPath('MyApp:searches'))
  14. });
  15.  
  16. /* in the list view */
  17.  
  18. ,contentBinding: "MyApp.searchController.arrangedObjects"
  19. ,contentValueKey: "query"
  20. ,contentUnreadCountKey: "count"
Add Comment
Please, Sign In to add comment