• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextField recieves string but does not display it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTextField recieves string but does not display it?
      • From: Quincey Morris <email@hidden>
    • Re: NSTextField recieves string but does not display it?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: PDFView focus ring
  • Next by Date: Re: NSTextField recieves string but does not display it?
  • Previous by thread: Magnify Glass Color Picker
  • Next by thread: Re: NSTextField recieves string but does not display it?
  • Index(es):
    • Date
    • Thread