Re: Installing a new login item?
Re: Installing a new login item?
- Subject: Re: Installing a new login item?
- From: Matt Judy <email@hidden>
- Date: Thu, 04 Jul 2002 00:23:04 -0700
It should also be noted that using this code...
NSUserDefaults *df = [NSUserDefaults standardUserDefaults];
NSDictionary *dd = [df persistentDomainForName:@"loginwindow"];
...dd contains the loginwindow prefs. The extra alloc/init, and
addsuitenamed, appears to be unnecessary.
--Matt
Matt Judy wrote:
Pierre-Olivier Latour wrote:
But once the dictionary is edited, calling:
[defaults setObject:loginItems
forKey:@"AutoLaunchedApplicationDictionary"];
[defaults synchronize];
Has no effects...
Any idea?
Actually, yes. Try adding a line:
[defaults removeObjectForKey:@"AutoLaunchedApplicationDictionary"];
[defaults setObject:loginItems forKey:@"AutoLaunchedApplicationDictionary"];
[defaults synchronize];
I don't know why, but sometimes, I've found I have to remove the object
before setting a new one will have an effect.
--Matt
_______________________________________________
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.
_______________________________________________
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.