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

Re: Force update


  • Subject: Re: Force update
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 12 Apr 2007 03:59:11 -0400


On Apr 12, 2007, at 3:44 AM, Bernard Meers wrote:

In my app I have a MVC architecture (model is a dictionary).
I binded my U.I. elements to this model and all is working fine, meaning I get the necessary updates.
BUT now I added a while loop in which I measure pixels on the screen and I would like to display these measured values in the U.I..

You really shouldn't be doing that. A while() loop will block the run loop and prevent incoming events from being handled properly. If it goes on for long enough your users will get a technicolor pizza cursor.


However I get no updates during the execution of the "while loop".
How can I force an update of the new values in the model??

You could create an NSTimer with a very short or no delay. If your timer callback, if the conditional that the loop depends upon is false, invalidate the timer.


sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Force update
      • From: Uli Kusterer <email@hidden>
    • Re: Force update
      • From: email@hidden
References: 
 >Force update (From: Bernard Meers <email@hidden>)

  • Prev by Date: Force update
  • Next by Date: OSX equivalent of Registry Keys?
  • Previous by thread: Force update
  • Next by thread: Re: Force update
  • Index(es):
    • Date
    • Thread