On Fri, Jun 27, 2008 at 8:55 PM, Daniel Richman
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I'm trying to program a simple timer app: you enter a number of seconds, and
> it updates a text field every second with the number of secs remaining. The
> problem is that I'm not able to do anything with the UI while this is going
> on. Here's my code:

Don't loop like this. Think about what is taking place... you are
looping never allowing your main thread to do anything else. Your loop
is not returning out to the normal runloop which handles user input
and drives your UI.

Look at using NSTimer to trigger a callback that will allow you to
update UI as needed.

-Shawn
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to