• 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: Finlay Dobbie <email@hidden>
  • Date: Thu, 28 Feb 2002 19:58:18 +0000

On Wednesday, February 27, 2002, at 10:20 PM, Michael Peirce wrote:

This background application sets LSUIElement to 1 so that it doesn't show up in the dock and it has no UI.

This tells the system that it DOES HAVE UI (like the Dock). If you have no UI, use LSBackgroundOnly.

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 is normally what you'd want. You can change this behaviour if you use LaunchServices, though (part of the ApplicationServices.framework umbrella).

-- Finlay
_______________________________________________
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.

References: 
 >launchApplication and window deselection (From: Michael Peirce <email@hidden>)

  • Prev by Date: Re: Random Number
  • Next by Date: Re: HTTP and FTP with cocoa
  • Previous by thread: Re: launchApplication and window deselection
  • Next by thread: Re: launchApplication and window deselection
  • Index(es):
    • Date
    • Thread