NSTextField recieves string but does not display it?
NSTextField recieves string but does not display it?
- Subject: NSTextField recieves string but does not display it?
- From: Erik Stainsby <email@hidden>
- Date: Sat, 04 Feb 2012 19:11:54 -0800
I am perplexed.
I have two windows. A is the source, B is the destination. A context menu action in A sets a string value on a message. The message arrives in window B, in a view which sets the stringValue of an NSTextField. I then read the stringValue back and echo it via NSLog() to ensure it arrived. All well and good. However, for some reason the NSTextField does not display the new value.
Urk?!
- (IBAction) setActionSelectorString:(NSString*)nodeSelector {
NSLog(@"%s- [d] %@", __PRETTY_FUNCTION__, __LINE__, nodeSelector);
if( nodeSelector != nil ) {
[[[self view] window] makeMainWindow];
[actionSelector setStringValue: nodeSelector];
[[self view] setNeedsDisplay:YES];
NSLog(@"%s- [d] %@", __PRETTY_FUNCTION__, __LINE__, [actionSelector stringValue]);
}
}
Both NSLog stmts return the expected value.
What have I done wrong/not done ?
- Erik
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden