• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Coding around a known bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding around a known bug


  • Subject: Re: Coding around a known bug
  • From: Charles Srstka <email@hidden>
  • Date: Sat, 2 Aug 2008 13:40:15 -0500

On Aug 2, 2008, at 11: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.

Why not just use the AppleScript to bring your app to the foreground in the first place, instead of TransformProcessType?


Charles
_______________________________________________

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


  • Follow-Ups:
    • Re: Coding around a known bug
      • From: Steve Cronin <email@hidden>
References: 
 >Coding around a known bug (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: My own listbox
  • Next by Date: Re: Putting a spinning progress indicator in a outline
  • Previous by thread: Coding around a known bug
  • Next by thread: Re: Coding around a known bug
  • Index(es):
    • Date
    • Thread