• 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: Really Big Windows and Interrupting computations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Really Big Windows and Interrupting computations?


  • Subject: Re: Really Big Windows and Interrupting computations?
  • From: Wade Tregaskis <email@hidden>
  • Date: Wed, 23 Jun 2004 10:44:44 +1000

I have a tight loop that looks like

put up a progress window
quit=NO
for i = 1 to some (possibly) big number
a(i) = some (upto )several second computation ( scaling big images )
force update of progress window with "displayIfNeeded"
if (quit) break
end

The progress window has a quit button which (if the action
routine ever gets called) would set quit to YES. The above
loop never lets the events "flow".

Tk has an "update" command that allows the Run Loop to dispatch
events. As far as I can tell there does not seem to be an
equivalent thingee in Cocoa.

Try NSRunLoop. It has various methods for running it, at least some of which are equivalent to Tk's "update".

Wade Tregaskis (aim: wadetregaskis)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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.


References: 
 >Really Big Windows and Interrupting computations? (From: Jerry LeVan <email@hidden>)

  • Prev by Date: Black Background in an imageview?
  • Next by Date: KVC indexed accessors in Java
  • Previous by thread: Re: Really Big Windows and Interrupting computations?
  • Next by thread: Natural language date DISPLAY
  • Index(es):
    • Date
    • Thread