Re: Force update
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
References: | |
| >Force update (From: Bernard Meers <email@hidden>) |