Created
August 10, 2010 14:47
-
-
Save ColinCampbell/517389 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // setting up an observer | |
| var query = SC.Query.local(MyApp.Record); | |
| var data = MyApp.store.find(query); | |
| var f = function(data) { | |
| if (data.get('status') & SC.Record.READY) { | |
| // data is ready | |
| return YES; | |
| } | |
| return NO; // optional, if nothing is returned then it shouldn't be removed | |
| } | |
| data.addFiniteObserver('status', this, f); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment