ItemManager is a basic class - it’s interacting with Parse.com to download a bunch of objects in a Parse.com class. The only real thing that is happening here is passing a callback to a function that makes a query to Parse.com via a network.request() call.
I’m a little confused by what you mean “… wrong place”; all I’m trying to do is pass a callback that refers to a method of ItemManager; however the anonymous function approach doesn’t work (well it seems to fire immediately with event == nil). The only approach that works so far is to have the callback as the local/private function.
Can I just ask where the anonymous call should go? Many thanks for your help.
Thank you Piotrz - the noob problem was that I hadn’t specified the arguments in the anonymous callback function, once I changed that everything is working as expected.
ItemManager is a basic class - it’s interacting with Parse.com to download a bunch of objects in a Parse.com class. The only real thing that is happening here is passing a callback to a function that makes a query to Parse.com via a network.request() call.
I’m a little confused by what you mean “… wrong place”; all I’m trying to do is pass a callback that refers to a method of ItemManager; however the anonymous function approach doesn’t work (well it seems to fire immediately with event == nil). The only approach that works so far is to have the callback as the local/private function.
Can I just ask where the anonymous call should go? Many thanks for your help.
Thank you Piotrz - the noob problem was that I hadn’t specified the arguments in the anonymous callback function, once I changed that everything is working as expected.