G’day
After trying to search for ‘idle’ and ‘ascobjc', I get ‘did not match any documents’. I did find ‘idle time’ under Cocoa, but I’ve never been able to wrap this old brain around converting from Cocoa to ascobjc.
I have absolutely no idea of what this does, or how to use it, but it sounds interesting.
If you have operations that can be deferred or broken into chunks and performed incrementally, doing so can help performance. Operations that are iterative or modular in nature, such as scratch calculations, can usually be performed in small chunks. By performing a few of these calculations at idle time using asynchronous notifications, you can avoid blocking your main thread. To register for idle time notifications , you would simply post a notification object to the default queue and ask for it to be dispatched at idle time, as shown in the following example: NSNotification* myNotification = [NSNotification notificationWithName:@"MyIdleNotification" object:myIdleHandlerObject]; | | [[NSNotificationQueue defaultQueue] enqueueNotification:myNotification postingStyle:NSPostWhenIdle]; |
Timers offer another way to do small amounts of work at more regular intervals. The advantage of timers is that they fire at a known time. The disadvantage is that they fire regardless of how busy your application is, which could still cause a perceptible delay. For information on how to set up a timer, see Timer Programming Topics. What I’ve been using, which seems responsible for the memory loss, is,
# my performSelector:"runningLoop:" withObject:(missing value) afterDelay:mailManagerDelay
What I NEED, in vanilla Applescript,but converted to ascobjc, is…
on |idle|() if not my reStartMM then initializingRoutinesThree(my reStartMM) else my runningLoopInitializer() end if end |idle|
Isanyone prepared to advise me on how I can use idle time in ascobjc, please.
And Shane, I’ve tried looking through this lists records, but for the life of me evry time I’ve tried, and can’t fing any way of searching them. And I’ve tried a bloody lot of times over the years, bbut given iup in frustration.
Regards
Santa
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
|