Re: Coding around a known bug
Re: Coding around a known bug
- Subject: Re: Coding around a known bug
- From: Andrew Merenbach <email@hidden>
- Date: Sat, 2 Aug 2008 16:11:56 -0700
On Aug 2, 2008, at 9:40 AM, Steve Cronin wrote:
Folks:
I'm looking for some advice on how to code around a Leopard bug
(radar 5905139 & 5599887).
Leopard broke the following:
OSStatus returnCode = TransformProcessType(&psn,
kProcessTransformToForegroundApplication);
TransformProcessType used to bring a background app to the
foreground, which it still does EXCEPT for the fact that the menubar
does not get correctly established until the user first brings
another app to the foreground and then re-establishes the 'wounded'
app as the foreground. Once this 'app toggling' is done, all is well.
So I can trap Tiger v. Leopard and do toggling only on Leopard,
that's pretty straight-forward.
What I'm looking for is best advice on how to get the menubar to be
'right' in code.
I've tried:
[[NSWorkspace sharedWorkspace] launchApplication:@"Finder"];
followed by an Applescript to 'activate' myself.
OK it works, but it jarring to have the 'Finder' just suddenly jump
into view and I'm quite sure customers will NOT like it.
Any thoughts?
Also any thoughts on how possibly to code this so that when, or if,
Apple ever fixes TransformProcessType that the fix might right
itself and not require a new version.
Thanks,
Steve
Hi, Steve,
The docs appear to mention something that may be of use -- see the
Discussion for TransformProcessType():
You can use this call to transform a background-only application
into a foreground application. A foreground application appears in
the Dock (and in the Force Quit dialog) and contains a menu bar.
This function does not cause the application to be brought to the
front; you must call SetFrontProcess to do so.
Apologies if you are already, but -- are you calling SetFrontProcess()?
Cheers,
Andrew
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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