On Oct 7, 2008, at 04:06 , Alex Reynolds wrote:
However, if I skip the NSThread instantiation step, then my NSTimer starts working again.I have also tried:[[NSRunLoop currentRunLoop] addTimer:myNSTimer forMode:NSDefaultRunLoopMode];in my new view, but this does not work either.What should I do to get an NSTimer to work after an NSThread completes?
Your notification is getting dispatched to the wrong thread. If you can target 10.5, do this:
[[NSRunLoop mainRunLoop] addTimer:myNSTimer forMode:NSDefaultRunLoopMode];
If you must target earlier versions of MacOS, there is a lot of documentation on re-dispatching notifications back to a specific thread... although it's much more complicated than the above
and I don't have the links at the moment... HTH, Jason
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]