Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Ken Worley
On Aug 27, 2008, at 12:05 PM, Sherm Pendley wrote: On Wed, Aug 27, 2008 at 1:48 PM, Kevin Kicklighter <[EMAIL PROTECTED]> wrote: NSDictionary *theError = [[[NSDictionary alloc] init] autorelease]; [quitScript executeAndReturnError:&theError]; } That still

Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Sherm Pendley
On Wed, Aug 27, 2008 at 2:24 PM, Ken Worley <[EMAIL PROTECTED]> wrote: > > On Aug 27, 2008, at 12:05 PM, Sherm Pendley wrote: > >> On Wed, Aug 27, 2008 at 1:48 PM, Kevin Kicklighter >> <[EMAIL PROTECTED]> wrote: >>> >>> NSDictionary *theError = [[[NSDictionary alloc] init] >>> autorele

Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Kevin Kicklighter
Good call, you are right. Fixed, and thanks, Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubsc

Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Sherm Pendley
On Wed, Aug 27, 2008 at 1:48 PM, Kevin Kicklighter <[EMAIL PROTECTED]> wrote: > >NSDictionary *theError = [[[NSDictionary alloc] init] > autorelease]; > >[quitScript executeAndReturnError:&theError]; >} That still leaks the dictionary you created. Didn't you

Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Kevin Kicklighter
Thanks to all that helped, here's the code working: NSUserDefaults *theDefaults = [NSUserDefaults standardUserDefaults]; NSDictionary *dockDict = [theDefaults persistentDomainForName:@"com.apple.dock"]; NSMutableDictionary *mutableDockDict=[dockDict mutableCopyWithZone:nil];

Re: Removing Applications from the Dock Programmatically

2008-08-27 Thread Negm-Awad Amin
Am Mi,27.08.2008 um 03:20 schrieb Graff: I forgot to mention that you'll have to force the Dock to re-load its preferences after fooling around like this. I really only know how to do this through the terminal or through AppleScript, although I'm sure there are other ways to do it IIRC, yo

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Sherm Pendley
On Tue, Aug 26, 2008 at 9:20 PM, Graff <[EMAIL PROTECTED]> wrote: > >NSDictionary *theError = [[NSDictionary alloc] init]; > >[quitScript executeAndReturnError:&theError]; You're leaking the dictionary you created here. Just initialize theError to nil, like this: NSDictionary

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Brett Powley
If you poke around inside any of the Apple installers that install icons in the Dock (e.g. iLife) you'll find scripts for adding and removing things from the Dock. However, they're not pretty Cheers, Brett On 27/08/2008, at 11:20 AM, Graff wrote: I forgot to mention that you'll have t

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Graff
I forgot to mention that you'll have to force the Dock to re-load its preferences after fooling around like this. I really only know how to do this through the terminal or through AppleScript, although I'm sure there are other ways to do it Here's an example of an AppleScript: NSString *q

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Graff
On Aug 26, 2008, at 5:34 PM, Kevin Kicklighter wrote: I need to remove applications that were on the the Dock, programmatically (running Leopard 10.5.4). Does anyone have a clue as to how I could accomplish this? You can access that information through NSUserDefaults as follows: N

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Conrad Taylor
Hi, what's your goal and context for wanting to do this? -Conrad On Tue, Aug 26, 2008 at 2:34 PM, Kevin Kicklighter < [EMAIL PROTECTED]> wrote: > I need to remove applications that were on the the Dock, programmatically > (running Leopard 10.5.4). Does anyone have a clue as to how I could > acco

Removing Applications from the Dock Programmatically

2008-08-26 Thread Kevin Kicklighter
I need to remove applications that were on the the Dock, programmatically (running Leopard 10.5.4). Does anyone have a clue as to how I could accomplish this? Thanks, Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p