• 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
Re: NSTextField value binding (feeling like a newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField value binding (feeling like a newbie)


  • Subject: Re: NSTextField value binding (feeling like a newbie)
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 18 Mar 2008 15:10:57 -0700


On Mar 18, 2008, at 14:33, Jeff LaMarche wrote:

I have bound the value binding of the NSTextField to an NSString called feedback,

Actually, you bind the text field to the property "feedback" of some object (File's Owner?). When you start using array properties, getting this terminology right will help you avoid a *lot* of grief. (Sometimes a property of an object is really an object, sometimes it's not.)


exposed as an Objective-C 2.0 property,declared like this:

@property (retain, nonatomic) NSMutableString *feedback;

In my implementation, use @synthesize to have it build the accessors and mutators. The binding is set to Continuously Updates Values, and is not editable, and has rich text turned off. If I run my program, and make changes to the string (feedback), those are not reflected in the text field even though I can tell through the debugger that the string is changing.

Make changes how? If you're doing 'someObject.feedback = newString', the text field should update. If you're doing (in a someObject method) 'feedback = newString', the text field won't update unless you enclose it in willChangeValueForKey/didChangeValueForKey.



_______________________________________________

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 value binding (feeling like a newbie)
      • From: Jeff LaMarche <email@hidden>
References: 
 >NSTextField value binding (feeling like a newbie) (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 430
  • Next by Date: Re: Carbon Menu in Cocoa app
  • Previous by thread: Re: NSTextField value binding (feeling like a newbie)
  • Next by thread: Re: NSTextField value binding (feeling like a newbie)
  • Index(es):
    • Date
    • Thread