Re: handling idle events

2008-08-06 Thread Negm-Awad Amin
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

Re: handling idle events

2008-08-06 Thread Michael Ash
On Tue, Aug 5, 2008 at 10:16 PM, Jim Crafton [EMAIL PROTECTED] wrote: 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

handling idle events

2008-08-05 Thread 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

Re: handling idle events

2008-08-05 Thread Jonathan Hess
Hey Jim - The typical way that I like to handle this is with these methods from NSRunLoop.h: @interface NSObject (NSDelayedPerforming) - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray *)modes; -

Re: handling idle events

2008-08-05 Thread chaitanya pandit
Hi, You can use NSNotificationQueue to post your custom notification when the run loop is idle (NSPostWhenIdle), and do the processing in it's listener method. On 05-Aug-08, at 10:16 PM, Jim Crafton wrote: Is there a way to handle idle time in an NSApplication? In Win32 or Carbon, since