• 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: Jeff LaMarche <email@hidden>
  • Date: Tue, 18 Mar 2008 18:17:49 -0400

Quincey -

Thanks much. You pointed me in the right direction - I was doing this:

[self.feedback appendString:string];

Thanks much for the help!

On Mar 18, 2008, at 6:10 PM, Quincey Morris wrote:


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

_______________________________________________

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


References: 
 >NSTextField value binding (feeling like a newbie) (From: Jeff LaMarche <email@hidden>)
 >Re: NSTextField value binding (feeling like a newbie) (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Python/Ruby for Cocoa (was: Simple question)
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 430
  • Previous by thread: Re: NSTextField value binding (feeling like a newbie)
  • Next by thread: Re: Cocoa-dev Digest, Vol 5, Issue 430
  • Index(es):
    • Date
    • Thread