Re: LaunchServices API + Cocoa Application
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.