Re: launchApplication and window deselection
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.