NSControl's not updating
NSControl's not updating
- Subject: NSControl's not updating
- From: Coleman Nitroy <email@hidden>
- Date: Fri, 13 Jan 2006 02:30:13 -0500
I have a NSTextField that will not update until much later in the
application and I have tried to force it but to no avail. Basically I
want the TextField to hide while I have a ProgressIndicator doing its
animation where the TextField was until the function is complete and
I stop the animation of the ProgressIndicator.
Here is how I am trying to force an update.
- (IBAction) someAction: (id) sender;
{
[textField setHidden: YES];
[textField setStringValue:@" "];
[textField setNeedsDisplay: YES];
[textField drawRect: [textField frame]];
[progress startAnimation: sender];
// ... it does some irrelevant stuff for awhile
[progress stopAnimation: sender];
[textField setStringValue:@"Were the previous functions successful??
Lets display that!"];
}
The ProgressIndicator draws itself over the TextField and even though
I am explicitaly calling -drawRect, it does not clear or show the new
properties, until after the ProgressIndicator has finished and has
changed to the success/failure text I set it to at the end.
I should note that I am running this in a modal sheet, and while the
animation is running some threaded stuff happens, although I am not
sure as to why that would effect the TextField because I explicitly
tell it to draw itself before the threaded stuff happens. Could this
be a modal sheet issue?
Regards,
Coleman Nitroy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden