Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass cmd line arguments to my carbon app?




thanks for the reply, just one question below ..

1) When the user double-clicks your app at runtime, it will pass the
Carbon psn in argv[1].  You can't avoid this.  So your app must be
written to be flexible about whether it's launched via
LaunchServices or from a Unix launch command, because the arg list
will be different.


no problems there.

2) My.app is your wrapper, which is a directory.  You can't launch a
directory.  You have to launch ./My.app/Contents/MacOS/My -psn
01234567 -somearg -somearg2


so what if i want the user to be able to double-click the .app bundle normally in Finder, but with different args? or is this where i -have- to use the Info.plist file to pass data into my app?



3) If your application is CFM (Mac OS 9-compatible, built with
CodeWarrior) it can't be launched directly; you have to launch it
with the LaunchCFMApp tool.  Arguments provided to LaunchCFMApp are
not passed through to the CFM app; the main() of a CFM app takes no
parameters.


no problems here, i have used XCode, and its just a 'normal' Carbon-based app, nothing OS9 about it at all ..


--

;

Jay Vaughan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: How to pass cmd line arguments to my carbon app? (From: Jay Vaughan <email@hidden>)
 >Re: How to pass cmd line arguments to my carbon app? (From: Chris Espinosa <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.