• 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
Re: question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: TAB and NSTextFields
  • Next by Date: Re: build problem
  • Previous by thread: question
  • Next by thread: Re: question
  • Index(es):
    • Date
    • Thread