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 14:14:59 +0200
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?
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
andy
--
Discussion forthcoming.