Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Detecting a user click while in a lengthy task (mainthread)
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Detecting a user click while in a lengthy task (mainthread)
Subject
:
Detecting a user click while in a lengthy task (mainthread)
From: Aurélien Hugelé <
email@hidden
>
Date: Fri, 13 Jan 2006 10:28:49 +0100
Hi list,
I need to offer the user to cancel a lengthy blocking task (suppose it can not be threaded, and thus runs in the mainthread).
basically something like while(!cancelled) { // do something }.
The problem here is that the action of my cancel button is not called because the UI is hanged by the task.
Is it possible in the while above, to add something like [[NSRunLoop currentRunLoop] runMode:XXXX beforeTime:[NSDate dateWithTimeIntervalSinceNow:0.1]] ??
So that the runloop will run a little at each cycle and the user click will be processed ? if yes what is the mode i need to pass (XXXX) ? NSDefaultRunLoopMode or NSEventTrackingRunLoopMode ?
thanks for any help.
PS : i know i should thread this, but it is much too complex for the moment...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Follow-Ups
:
Re: Detecting a user click while in a lengthy task (mainthread)
From:
Shawn Erickson <email@hidden>
Re: Detecting a user click while in a lengthy task (mainthread)
From:
Markus Hitter <email@hidden>
Prev by Date:
NSControl's not updating
Next by Date:
Re: Detecting a user click while in a lengthy task (mainthread)
Previous by thread:
Re: NSControl's not updating
Next by thread:
Re: Detecting a user click while in a lengthy task (mainthread)
Index(es):
Date
Thread