You need to sign in to do that
Don't have an account?

[zksForce] multiple queries
hi... i'm working in iOS. it seems I can only have one call to client:query with a selector running at any time. if more than one are launched, my app is crashing. if i put them serially, everything is fine.
is this just an iOS threading issue? is there a way to call multiple client.query methods with separate selectors in the same method?
thanks!
This is definitely wrong, selectors are not strings. you want @selector(cuurrentFacilityQueryDidFinish:error:context:)
All Answers
I assume you mean the ios toolkit, as there's no methods in zksforce that take a selector. Having said that, with the ios toolkit i was able to have 3 calls to query outstanding, and they all completed as expected. Was this on the simulator or the device, do you have a stack trace for the crash ?
Hi Simon,
Yes, the iOS toolkit, apologies. Actually, zksforce's Results array worked fine for me running three methods in a row.
With the iOS toolkit:
Do you have to use different pointers or anything to use selectors?
I start having issues w/ more than one selector running at a time. For example, two methods like:
- (void)firstQueryDidFinish:(ZKQueryResult *)result;
- (void)otherQueryDidFinish:(ZKQueryResult *)result;
Any help is appreciated. Your three call example... is that source (just the selector signatures) you can share?
Thanks!
I had something like
Interesting... I'll try w/out the delegates. I had trouble getting two of these to fire from the same method.
Thanks Simon! Let me know if you notice anything else odd in this snippet. :)
This is definitely wrong, selectors are not strings. you want @selector(cuurrentFacilityQueryDidFinish:error:context:)
ha... **bleep**. sorry. must have been late when i did that. that sucks that it compiles and runs. it'll actually fire the selector from the string. but, just one of them. odd.
thanks again Simon!
odd word to bleep... it wasn't anything bad (for the record) :)