Hi,

maybe you can use a thread and set the thread priority low. I never tried it, just an idea. http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSThread_Class/Reference/Reference.html#/ /apple_ref/occ/clm/NSThread/setThreadPriority:

I think, that this a better design, because the main thread can interrupt the "idle thread", if the idle thread takes a long time and would block the app otherwise.

Amin





Am Mi,06.08.2008 um 04:16 schrieb Jim Crafton:

Is there a way to handle idle time in an NSApplication? In Win32 or
Carbon, since you manually write the actual while loop that processes
the events, this is pretty easy to do. Is there anything like this in
Cocoa? I've got some objects whose state (possibly) needs to be
updated, and I was planning on handling this in the "idle" handler.

My other idea, if this is not possible, would be to simply have a
timer that fires off every 0.5 seconds or so.

Thanks

Jim C
_______________________________________________

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/negm-awad%40cocoading.de

This email sent to [EMAIL PROTECTED]

Amin Negm-Awad
[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