Ok, so I have a NSTextField (a label) called countDisplay, and when a zero-length string is entered into another text field, I'd like to change the color of countDisplay to red, display a message, and change back to black again. Only problem is that it displays in black no matter what. When I comment out the last line of this code, the string correctly displays in red, but then, since the last line is commented out, doesn't change back. 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]];
_______________________________________________

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