On Tue, Oct 7, 2008 at 4:42 AM, Jason Coco <[EMAIL PROTECTED]> wrote: > Your notification is getting dispatched to the wrong thread. If you can > target 10.5, do this: > > [[NSRunLoop mainRunLoop] addTimer:myNSTimer forMode:NSDefaultRunLoopMode];
Please *don't* do this. NSRunLoop is not thread safe, and so cannot be used from any thread other than the one it's in charge of. Either use CFRunLoop instead (CFRunLoop is thread safe, CFRunLoopTimer is toll-free bridged to NSTimer) or use performSelectorOnMainThread: to get some code running on the main thread, then add the timer from there. Mike _______________________________________________ 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]