Man! That sure simplified things. Thanks for the tip. Works perfectly. I ended up using NSRunLoopCommonModes which is apparently Leopard only. But that's fine for my app.

Thanks.

-Matt


On Mar 19, 2008, at 7:16 PM, Wim Lewis wrote:


On Mar 19, 2008, at 6:00 PM, Matt Long wrote:
[self performSelector:@selector(checkPlayback:) withObject:currentTimeValue afterDelay:0.15]

While the secondary window is open, checkPlayback never gets called. As soon as the window gets closed, though, all of these events pile up at my break point in checkPlayback. Of course, at that point, it is too late. The time when I needed it to fire has passed.

-performSelector:afterDelay: works via the run loop (perhaps using an NSTimer, I forget). Any run loop source (such as a timer waiting to fire) works in some set of run loop modes. AppKit defines a handful of modes that it uses, including the normal everyday run loop mode, one that's used during modal dialogs, one during mouse- tracking loops, etc.

Anyway, check the documentation of NSRunLoop / CFRunLoop for run loop modes, and of the - performSelector:withObject:afterDelay:inModes: method.


_______________________________________________

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/matt.long%40matthew-long.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

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]

Reply via email to