Re: NSControl's not updating
Re: NSControl's not updating
- Subject: Re: NSControl's not updating
- From: Mike Abdullah <email@hidden>
- Date: Fri, 13 Jan 2006 18:05:23 +0000
Maybe try sending an update message to the containing window or
parent view?
Mike A.
On 13 Jan 2006, at 07:30, Coleman Nitroy wrote:
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
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