On 7 Jan 2009, at 7:34 am, Walker Argendeli wrote:

But if I uncomment the last line again, countDisplay remains black, displaying the message in black instead of red. What's going on?

// Set display text to red for zero-length warning...
                [countDisplay setTextColor:[NSColor redColor]];
                [countDisplay setStringValue:@"***Please enter a string***"];
                // ...and back again
                [countDisplay setTextColor:[NSColor blackColor]];


You do realise that the time between setting red and then back to black is measured in nanoseconds, right? But even if your computer had a clock speed of 1Hz, you wouldn't see the change anyway because the screen is only updated at the end of each event cycle.

You need to arrange for the reset to black to occur after a useful time delay, maybe by kicking off a timer and then setting black in its callback method.

--Graham


_______________________________________________

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 arch...@mail-archive.com

Reply via email to