Re: performSelectorOnMainThread and exceptions
At 6:51 PM -0500 10/27/08, Ken Thomases wrote: On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector never happens. note that the performSelectonOnMainThread, and the throw and catch are all in the same run of the run loop and are all in the main thread. is this a bug (seems like it to me) or proper/expected behavior. if i didn't catch the exception, i could understand this, but as i said, i am catching it. if this is proper behavior, can anyone offer me an explanation as to why? Sounds like a bug to me. File it with Apple http://bugreport.apple.com. Out of curiosity, since you're only trying to defer a message and everything's on the main thread, does it still happen with [anObject performSelector:aSelector withObject:nil afterDelay:0]? for the archives. so i built a very simple test application in preparation to filing a bug report and to try [anObject performSelector:aSelector withObject:nil afterDelay:0]. and lo and behold, my deferred method was executed using either deferred variants! so i revisited the issue in my app, and sure enough it is now working as i expected, ie, the deferred method is invoked, even when an exception is thrown. musta been brain freeze the first time around! :-( ken Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: performSelectorOnMainThread and exceptions
On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector never happens. note that the performSelectonOnMainThread, and the throw and catch are all in the same run of the run loop and are all in the main thread. is this a bug (seems like it to me) or proper/expected behavior. if i didn't catch the exception, i could understand this, but as i said, i am catching it. if this is proper behavior, can anyone offer me an explanation as to why? Sounds like a bug to me. File it with Apple http:// bugreport.apple.com. Out of curiosity, since you're only trying to defer a message and everything's on the main thread, does it still happen with [anObject performSelector:aSelector withObject:nil afterDelay:0]? Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: performSelectorOnMainThread and exceptions
At 6:51 PM -0500 10/27/08, Ken Thomases wrote: On Oct 27, 2008, at 4:05 PM, [EMAIL PROTECTED] wrote: if i call -[anObject performSelectorOnMainThread:aSelector withObject:nil waitUntilDone:NO] and then later throw an exception (of my own), which i catch, the deferred execution of aSelector never happens. note that the performSelectonOnMainThread, and the throw and catch are all in the same run of the run loop and are all in the main thread. is this a bug (seems like it to me) or proper/expected behavior. if i didn't catch the exception, i could understand this, but as i said, i am catching it. if this is proper behavior, can anyone offer me an explanation as to why? Sounds like a bug to me. File it with Apple http://bugreport.apple.com. will do/ Out of curiosity, since you're only trying to defer a message and everything's on the main thread, does it still happen with [anObject performSelector:aSelector withObject:nil afterDelay:0]? i didn't try that. however, i've since re-architected somewhat and can't easily test in my app. i may try that before filing a bug report. ken Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]