Re: launchApplication and window deselection
Re: launchApplication and window deselection
- Subject: Re: launchApplication and window deselection
- From: Enrico Pancaldi <email@hidden>
- Date: Thu, 28 Feb 2002 00:39:28 +0100
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?
Enrico
On Wednesday, February 27, 2002, at 11:20 PM, Michael Peirce wrote:
I'm working on an app that sometimes launches a background
application. This background application sets LSUIElement to 1 so
that it doesn't show up in the dock and it has no UI.
I use the following code to launch the app (it lives inside my
main app's bundle):
helperPath = [[NSBundle mainBundle]
pathForResource:helperAppNameShort ofType:@"app"];
[[NSWorkspace sharedWorkspace] launchApplication: helperPath];
This works well enough, but my main app's main window becomes
deselected afterwards. Also the menu bar is deselected - I click
on the menu bar and it's "dead" - no menus drop down. Once I
click on the main window, it becomes selected and menus work again.
This seems like a bug (which I'll report if it is) and I'm trying
to come up with a work around. I tried immediately calling
[mainWindow makeKeyAndOrderFront: nil];
[mainWindow makeFirstResponder:mainWindowView];
after the launchApplication method is invoked, but that doesn't help.
Has anyone ran across this?
--
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.
_______________________________________________
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.