• 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: Cocoa Bindings - NSTextfield value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Bindings - NSTextfield value


  • Subject: Re: Cocoa Bindings - NSTextfield value
  • From: George Orthwein <email@hidden>
  • Date: Thu, 10 Aug 2006 05:16:42 -0400

On Aug 10, 2006, at 2:24 AM, Mike Hanna wrote:

I bind an NSTextField value binding to the Shared User Defaults. Controller Key is 'values' and Model Key Path set to 'filePath'. Click Bind. I set the field like this:

[pathField setStringValue:fFilePath];


That won't work. You have to set the value in the model instead:
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaBindings/Concepts/Troubleshooting.html#//apple_ref/doc/uid/ TP40002148-182467


So I guess:
[[NSUserDefaults standardUserDefaults] setObject:fFilePath forKey:@"filePath"]


(Or maybe you should set it through the Shared Defaults Controller, not sure if it makes a difference.)

Hope that helps,
George
_______________________________________________
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


References: 
 >Cocoa Bindings - NSTextfield value (From: Mike Hanna <email@hidden>)

  • Prev by Date: Timzeone change notification
  • Next by Date: Default value for Date Atttribute in Core Data application
  • Previous by thread: Cocoa Bindings - NSTextfield value
  • Next by thread: Timzeone change notification
  • Index(es):
    • Date
    • Thread