RE: Binding to Accessors of Application Delegate
RE: Binding to Accessors of Application Delegate
- Subject: RE: Binding to Accessors of Application Delegate
- From: "Christopher Hickman" <email@hidden>
- Date: Fri, 19 May 2006 17:08:24 -0400
> The issue here is not that a key might require full stops, it's that
> the value is not a key -- it's an argument. And you cannot
> supply an argument like this in a key path.
So what I need to do is write a KVO compliant method (e.g. desktopDomain)
somewhere (where's appropriate, my application delegate perhaps?) that
returns [[NSUserDefaults sharedUserDefaults]
persistentDomainForName:@"com.apple.desktop"], and then use that cascading
dot notation to access the keys in that dictionary?
So given said method in my delegate, binding to File's Owner (NSApplication)
with the Model Key Path
delegate.desktopDomain.Background.default.ImageFilePath will give me the
string equivelent to [[[[[NSUserDefaults standardUserDefaults]
persistentDomainForName:@"com.apple.desktop"] objectForKey:@"Background"]
objectForKey:@"default"] objectForKey:@"ImageFilePath"], right?
Topher
_______________________________________________
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