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 16:34:37 -0800
This is a question for the Carbon list. Eric Schlegel probably knows
the answer to all of this stuff instantly :)
I don't think it's a bug that the dock icon doesn't bounce—by the
time you call TransformProcessType, the app has already "loaded" so
the time for bouncing has passed.
I can't explain the menubar issue, though.
On Nov 22, 2006, at 4:28 PM, Claudio Procida wrote:
That isn't your only concern. If the user isn't running as an
admin, it is likely that they won't be able to modify the app
bundle's contents at all :|
Also, in a multi-user environment, you may have two different
users and each one could have a different preference about whether
it should show in the dock or not.
definitely right.
Right. That will do it.
I learn that TransformProcessType will work only if the app is
LSBackgroundOnly (while I need LSUIElement, as I'd like to always
show the window).
Second, where do I have to put the call to TransformProcessType? In
applicationDidFinishLaunching: seems to be too late, as the Dock
icon won't show. I've put it into the app's delegate +initialize:
method and still I have these glitches
- the Dock Icon won't bounce, it just appears from nowhere already
still.
- the menubar won't show!
the code I'm using now is the following:
if (![[defaults valueForKey:MBLHideDockIconKey] boolValue])
{
ProcessSerialNumber psn = { 0, kCurrentProcess };
OSStatus returnCode = TransformProcessType <http://cocoadev.com/
index.pl?TransformProcessType>(&psn,
kProcessTransformToForegroundApplication);
if (returnCode != 0)
{
NSLog <http://cocoadev.com/index.pl?NSLog>(@"Could not
transform to a foreground app. Error %d", returnCode);
}
OSErr errCode = SetFrontProcess(&psn);
if (errCode != 0)
{
NSLog <http://cocoadev.com/index.pl?NSLog>(@"Could not bring
the app to front. Error %d", errCode);
}
}
I guess I'm going slightly Off Topic here since this is Carbon
stuff :/
--
Claudio Procida
Emeraldion Lodge
http://www.emeraldion.it
_______________________________________________
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:
40blizzard.com
This email sent to email@hidden
_______________________________________________
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