• 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: Key path for values in "Shared User Defaults"? [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key path for values in "Shared User Defaults"? [SOLVED]


  • Subject: Re: Key path for values in "Shared User Defaults"? [SOLVED]
  • From: Matthias Arndt <email@hidden>
  • Date: Tue, 24 Mar 2009 17:46:45 +0100

Keary,

On 24.03.2009, at 16:21 Keary Suska wrote:

OTOH, you could have an outlet to the defaults controller, say, named "defaultsController" and use @"defaultsController.values.DEFALTSKEY" to keyPathsForValuesAffectingPreview. I think that is supposed to work...

Wow, thank you so much, you really made my day! Yesterday I already tried "values.DEFAULTSKEY" as a key path, and wondered how to reference the defaults controller. I just didn't thought of IBOutlet'ing it, shame on me ...


This code snippet works perfectly:

- (NSSet *)keyPathsForValuesAffectingPreview
{
// Use KVO to update the print panel's preview if one of the options is changed. The defaultsController is bound via IBOutlet

return [NSSet setWithObjects:
@"defaultsController.values.PrintJumps",
@"defaultsController.values.PrintGrid",
@"defaultsController.values.PrintFastMode",
nil];
}

Take care, Mattes _______________________________________________

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: 
 >Key path for values in "Shared User Defaults"? (From: Matthias Arndt <email@hidden>)
 >Re: Key path for values in "Shared User Defaults"? (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: NSTableDataSource: objectValueForTableColumn Working but setObjectValue Passing Bad Parameters
  • Next by Date: Re: Class gets EXC_BAD_ACCESS only as NSOperation
  • Previous by thread: Re: Key path for values in "Shared User Defaults"?
  • Next by thread: Core Data: is fetching safe during validateForInsert:/validateForUpdate?
  • Index(es):
    • Date
    • Thread