Re: LaunchServices API + Cocoa Application
Re: LaunchServices API + Cocoa Application
- Subject: Re: LaunchServices API + Cocoa Application
- From: Stéphane Sudre <email@hidden>
- Date: Tue, 18 Sep 2001 15:46:33 +0200
On mardi, septembre 18, 2001, at 02:14 PM, Andreas Monitzer wrote:
On Tuesday, September 18, 2001, at 12:33 , Stiphane Sudre wrote:
- provide some command-line arguments when launching the Cocoa
Application but it does not seem possible to do that using the
LaunchService APIs. Is it ?
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...
BTW, is there a way to discuss with the LoginWindow.app application to
know if someone is logged (the BSD stuff can surely do this) ?
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:/