On May 23, 2008, at 11:08 PM, Andrew Farmer wrote:

On 23 May 08, at 21:22, parag vibhute wrote:
But my requirement is to pass arguments to GUI apps while launching it
& is it possible using Launch services? I will post my code of NSTask
for launching GUI app in 1-2 days as my Mac is in office.

GUI applications generally do not take arguments - opened files are passed using Apple Events. Hence, Launch Services doesn't provide any way to pass arguments.

LSOpenURLsWithRole does, sort of: LSApplicationParameters has an argv field which the docs say it's unused on 10.4. No idea if it's used on 10.5 (or even if the question is related to the subject any more...as others have said, NSTask is the obvious solution for /usr/bin/zip).
--
Adam
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to