• 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: launchApplication and window deselection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launchApplication and window deselection


  • Subject: Re: launchApplication and window deselection
  • From: Michael Peirce <email@hidden>
  • Date: Wed, 27 Feb 2002 22:50:11 -0500

On Wednesday, February 27, 2002, at 06:39 PM, Enrico Pancaldi wrote:

I don't think is a bug. I've never used launchApplication: before, but it is reasonable that when you launch an application, it gets the focus.
If the background app doesn't have UI, what about using a command line one?

But if the app already tells the system that it doesn't have a UI...

And there is no command line interface. This app is just like a classic faceless background application.

On Wednesday, February 27, 2002, at 07:42 PM, email@hidden wrote:

The problem is what app is considered active, not what window is key. Try [NSApp activateIgnoringOtherApps:YES];. You might be able to do this synchronously, or you might have to wait until you receive the NSWorkspaceDidLaunchApplicationNotification.

This approached did the trick. The key seems to be the activateIgnoringOtherApps method.

For some reason NSWorkspaceDidLaunchApplicationNotification didn't come through after launch. I added my own private notification and it synchronized nicely.

I also had to make my main window key (though the menus work without doing this).

Much thanks.

--
Michael Peirce
6497 Spinnaker Drive
Lewis Center OH 43035
740-657-1269
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: launchApplication and window deselection
      • From: email@hidden
References: 
 >Re: launchApplication and window deselection (From: email@hidden)

  • Prev by Date: Re: NSView Names
  • Next by Date: Re: Curl GUI wrapper using NSTask == no output?
  • Previous by thread: Re: launchApplication and window deselection
  • Next by thread: Re: launchApplication and window deselection
  • Index(es):
    • Date
    • Thread