• 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: LaunchServices API + Cocoa Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LaunchServices API + Cocoa Application


  • Subject: Re: LaunchServices API + Cocoa Application
  • From: Andreas Monitzer <email@hidden>
  • Date: Tue, 18 Sep 2001 17:11:08 +0200

On Tuesday, September 18, 2001, at 03:46 , Stiphane Sudre wrote:

On mardi, septembre 18, 2001, at 02:14 PM, Andreas Monitzer wrote:

CFM Carbon apps don't know about command line parameters, so I guess they didn't implement it. Maybe you can use environment variables or defaults?

But NSWorkSpace is said to be based on LaunchServices...

That's correct. So?

- (BOOL)launchApplication:(NSString *)appName;

doesn't include command line parameters.

You have to use the SystemConfiguration framework and listen for the key State:/Users/ConsoleUser changing (there's a public API for it in a system that should ship pretty soon).

Try this in Terminal:
% scutil
> open
> get State:/Users/ConsoleUser
> d.show

Thanks. It seems there is a bug in 10.0.4 since the Keyword is state:/ when the other ones are States:/

No, the other ones are "State:" (singular). But the API is case-sensitive,
so it looks like a bug to me, too. However, since the API is private in 10.0.4 and changed in 10.1, it doesn't matter.

andy
--
Discussion forthcoming.


References: 
 >Re: LaunchServices API + Cocoa Application (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: QuickDraw LockPixels on Mac OS X (was: Saving a series of BitmapReps as Quicktime)
  • Next by Date: Re: Need original stdio.h file
  • Previous by thread: Re: LaunchServices API + Cocoa Application
  • Next by thread: Re: LaunchServices API + Cocoa Application
  • Index(es):
    • Date
    • Thread