• 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: Open OtherApp just behind MyApp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open OtherApp just behind MyApp


  • Subject: Re: Open OtherApp just behind MyApp
  • From: Yang Meyer <email@hidden>
  • Date: Thu, 5 Feb 2009 09:31:21 +0100

Ken,

I want to open another application (say, Safari) in the "layer" just behind my application.

"Solution" 2:
[ws launchApplication:@"Safari"]; // opens Safari in front
[NSApp activateIgnoringOtherApps:YES]; // pushes my app in front, effectively right above Safari


Problem with solution 2: I must be doing it wrong, because my own application's window doesn't ever get its focus back and the GUI seems to hang.

I think that -activateIgnoringOtherApps: is being done "too soon". The NSApplicationDeactivatedEventType event is pending and hasn't had a chance to be processed, yet. (…) So, you have to implement a simple trampoline method.

Thanks for pointing out the potential cause. I read up on Obj-C trampoline methods/objects (pretty cool, actually!) and understand the basic idea, but honestly I'm not seeing the connection to my problem. Why and how would such a trampoline object help in delaying the call to -activateIgnoringOtherApps:? Could you maybe sketch out how the trampoline might look?


Thanks,
Yang_______________________________________________

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: Open OtherApp just behind MyApp
      • From: Ken Thomases <email@hidden>
References: 
 >Open OtherApp just behind MyApp (From: Yang Meyer <email@hidden>)
 >Re: Open OtherApp just behind MyApp (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Memory management question in Objective-C 2.0 @property notation
  • Next by Date: Re: Memory management question in Objective-C 2.0 @property notation
  • Previous by thread: Re: Open OtherApp just behind MyApp
  • Next by thread: Re: Open OtherApp just behind MyApp
  • Index(es):
    • Date
    • Thread