• 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: Bindings, User Defaults and the UI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Bindings, User Defaults and the UI (From: "Jeffrey E. Forcier" <email@hidden>)
 >Re: Bindings, User Defaults and the UI (From: Julian <email@hidden>)

  • Prev by Date: Re: NEWBIE - production version - zerolink
  • Next by Date: Re: Bindings, User Defaults and the UI
  • Previous by thread: Re: Bindings, User Defaults and the UI
  • Next by thread: Re: Bindings, User Defaults and the UI
  • Index(es):
    • Date
    • Thread