Re: Replacing Info.plist programmatically
Re: Replacing Info.plist programmatically
- Subject: Re: Replacing Info.plist programmatically
- From: John Stiles <email@hidden>
- Date: Wed, 22 Nov 2006 11:08:17 -0800
On Nov 22, 2006, at 11:00 AM, Claudio Procida wrote:
Il giorno 22 nov 2006, alle ore 19:49, Sherm Pendley ha scritto:
The currently logged-in user quite often does not have permission
to do that. For instance, a normal (i.e. non-Admin) user cannot
modify anything in /Applications. What's more, if memory serves,
an app's Info.plist is read at startup and ignored after that, so
even if you could make such changes, you'd need to restart the app
(or jump through other, equally-annoying hoops) to see the results
of the change.
Hmm...
Actually, this smells like an A/B problem. You have problem A, and
you've decided the best solution for it is B (editing Info.plist).
But it's probably not; if you tell us about A, there's probably a
much better solution for that.
I mentioned Quicksilver because the scenario is exactly the same. I
have a regular app that has a status item. I'd like to give the
user the ability to choose if the app should have its Dock icon and
a menu or just appear as a status item.
If all you want to do is change the Dock icon for your app at run-
time, why not simply use NSApplication's -setApplicationIconImage:?
I'd like to _remove_ the icon, not change its appearance (I already
do this in the app)...
You could implement a handler delegate method
fileManager:shouldProceedAfterError: - the second argument should
give you more detailed information about the error.
I'll add a handler to gather more information on the error.
There's really no reason to change your Info.plist. This research
will not help you.
If you want to control whether you're in the dock or not at startup,
see my previous email re TransformProcessType. Hacking your
Info.plist to do this is much more difficult.
If you want to convert from a docked app to an undocked app after
you've started up, sorry—there's no way to do this in OS X. You'll
have to ask the user to relaunch the app.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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