• 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: Problems with runModalForWindow, looking for alternatives
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with runModalForWindow, looking for alternatives


  • Subject: Re: Problems with runModalForWindow, looking for alternatives
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 01 Nov 2011 16:31:29 -0700

On Nov 1, 2011, at 3:06 PM, Vojtěch Meluzín wrote:

> Anyway we are getting out of the topic. Does anyone here know why the modal windows work in a plugin (in a normal application) and not from a console application?

Basically, apps aren’t intended to be launched by a plain exec. A normal launch through the LaunchServices API provides some extra setup and state. You _can_ launch an app from a shell or equivalent, and it’ll mostly work, but that’s mostly as a convenience for developers and for debugging, and there’s no guarantee that everything will work correctly. One of the known side effects is that the app launches in an indeterminate state in between active and inactive, which is probably what you’re seeing.

If you need to launch an app programmatically, look at the LaunchServices API, or from a shell use the ‘open’ command on the bundle.

—Jens_______________________________________________

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: Problems with runModalForWindow, looking for alternatives
      • From: Ken Thomases <email@hidden>
    • Re: Problems with runModalForWindow, looking for alternatives
      • From: Vojtěch Meluzín <email@hidden>
References: 
 >Re: Problems with runModalForWindow, looking for alternatives (From: Vojtěch Meluzín <email@hidden>)
 >Re: Problems with runModalForWindow, looking for alternatives (From: Jens Alfke <email@hidden>)
 >Re: Problems with runModalForWindow, looking for alternatives (From: Vojtěch Meluzín <email@hidden>)
 >Re: Problems with runModalForWindow, looking for alternatives (From: Jens Alfke <email@hidden>)
 >Re: Problems with runModalForWindow, looking for alternatives (From: Vojtěch Meluzín <email@hidden>)

  • Prev by Date: Re: Custom NSView binding
  • Next by Date: Re: NSAssert no longer displaying reason in console
  • Previous by thread: Re: Problems with runModalForWindow, looking for alternatives
  • Next by thread: Re: Problems with runModalForWindow, looking for alternatives
  • Index(es):
    • Date
    • Thread