Re: Bindings, User Defaults and the UI
Re: Bindings, User Defaults and the UI
- Subject: Re: Bindings, User Defaults and the UI
- From: "Jeffrey E. Forcier" <email@hidden>
- Date: Wed, 28 Sep 2005 21:29:47 -0400
I think that's what I'm doing now, actually:
for key in self.syncFieldItems:
self.controllerValues.setValue_forKeyPath_(objc.YES,"syncFields.%
s"%key)
where self.controllerValues is equivalent to
NSUserDefaultsController.sharedUserDefaultsController().values() (or
[[NSUserDefaultsController sharedUserDefaultsController] values] in
straight Obj-C).
On Sep 28, 2005, at 8:52 PM, Julian wrote:
Hey Jeffery,
For the 5th checkbox just add an IBAction like so and wire it up:
- (IBAction)test:(id)sender {
[[[NSUserDefaultsController sharedUserDefaultsController]
values] setValue:THE_VALUE forKey:@"k1"];
[[[NSUserDefaultsController sharedUserDefaultsController]
values] setValue:THE_VALUE forKey:@"k2"];
[[[NSUserDefaultsController sharedUserDefaultsController]
values] setValue:THE_VALUE forKey:@"k3"];
[[[NSUserDefaultsController sharedUserDefaultsController]
values] setValue:THE_VALUE forKey:@"k4"];
}
With all 4 other bound keys and whatever THE_VALUE, prob [NSNumber
numberWithBool:YES || NO]
This will validate the items immediately and update the UI.
~Julian
email@hidden
--
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No right to
confidential or privileged treatment of this message is waived or lost
by any error in transmission. If you have received this message in
error, please immediately notify the sender by e-mail or by telephone at
212.981.6540, delete the message and all copies from your system and
destroy any hard copies. You must not, directly or indirectly, use,
disclose, distribute, print or copy any part of this message if you are
not the intended recipient.
_______________________________________________
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