Re: Installing a new login item?
Re: Installing a new login item?
- Subject: Re: Installing a new login item?
- From: Pierre-Olivier Latour <email@hidden>
- Date: Wed, 03 Jul 2002 14:28:33 +0200
>
> NSUserDefaults * defaults = [[NSUserDefaults alloc] init];
>
>
with this:
>
>
NSUserDefaults *defaults = [NSUserDefaults standardDefaults];
Yes, you have to add domains where NSUserDefaults can look for keys. Using
standardDefaults add the "standard" list of domains.
Or you can use:
NSUserDefaults * defaults = [[NSUserDefaults alloc] init];
[defaults addSuiteNamed:@"loginwindow"];
To look only into the "loginwindow" domain.
However, the code still doesn't work for me...
[defaults objectForKey:@"AutoLaunchedApplicationDictionary"]
Returns an array of 0 entries instead of 7 ones (as indicated in [defaults
persistentDomainForName:@"loginwindow"]).
However, this works of course:
[[defaults persistentDomainForName:@"loginwindow"]
objectForKey:@"AutoLaunchedApplicationDictionary"]
But once the dictionary is edited, calling:
[defaults setObject:loginItems forKey:@"AutoLaunchedApplicationDictionary"];
[defaults synchronize];
Has no effects...
Any idea?
Right now, I'm modifying the loginwindow.plist file directly: it works fine,
but it's not clean.
_____________________________________________________________
Pierre-Olivier Latour email@hidden
Manager and Lead Programmer
French Touch software
http://www.french-touch.net
Cool source code:
http://www.french-touch.net/CodeWareHouse
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.