Re: Cocoa Bindings - NSTextfield value
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