Re: question
Re: question
- Subject: Re: question
- From: Bruno Gaufier <email@hidden>
- Date: Tue, 2 Sep 2003 20:17:39 +0200
Hi,
On Tuesday, September 2, 2003, at 07:00 PM, Tehrani, Henry wrote:
I am creating a native application under OSX and have some problems
that I
did not have under OS9.
1. Why can't I update the display or drawing on a window as I have it
displayed while doing a long calculation?
If you only use [something setNeedsDisplay:YES], the redraw will occur
on the next event loop.
You've to call [something displayIfNeeded] to force an immediate redraw.
2. How do I update the progress bar as I do a long calculation?
See above.
3. How do I create a separate thread for doing this kind of long
processes
with a cancel button?
There is a NSThread class : Your can send it (the NSThread class) a
detachNewThreadSelector:... message to create a
new thread.
You will find many (useful) details in the documentation :
Documentation > Cocoa > Resource Management > Multithreading
about communication between the threads (NSConnection), locking the
objects (NSLock), redrawing the screen...
--
Bruno Gaufier
----
email@hidden
email@hidden
http://perso.club-internet.fr/bgaufier/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.