On Dec 16, 2009, at 10:06 AM, Arun wrote:

If i launch Applications from Terminal, using the command
/Applications/Calculator.app/Contents/MacOS/Calculator
The application is getting launched. But the Application widow will not be the key window. Is there any way in which i can launch the application using
the same command and still make the Application window as key window?

That's because Terminal hasn't relinquished its frontmost status, and a newly launched app won't come to the front unless it's been relinquished.

You could call [NSApp activateIgnoringOtherApps: YES] in your app when it launches, but that's kind of rude.

But I agree with the others that passing command-line parameters to a GUI app is a pretty odd thing to do; you should rethink it unless you have some really strong reason to do it (like, this app is a developer tool that will mostly be invoked from the command line.)

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to