Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Launching an Application from an Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launching an Application from an Application



On Dec 20, 2005, at 2:04 PM, Chris Espinosa wrote:

On Dec 20, 2005, at 2:00 PM, David Lalonde wrote:

I am a Palm OS conduit programmer for both Palm OS and Mac OS X. Lately, I added functionality that Carbon does not support. The plan was to create a UNIX application, then launch this application from within the conduit using the standard system() C function. My conduit development is limited to Metrowerks and PowerPlant and Carbon on Mac OS.

Today, I have come to realize system() is an empty function in Mertrowerks MSL C. At this time, the plan is falling apart and I want to revive it. Apple Events, which I have never coded for, looks very difficult for such a simple task. I am asking the developer community on this mailing list to offer suggestions, workaround, whatever, that would allow the conduit to launch the helper application and pass it a text string as a parameter.

Investigate LaunchServices.  It's a framework for, well, launching applications.  It should have what you need.
Chris is correct. LaunchServices is the way to go.
Also, you should consider switching to Xcode, which fully supports POSIX out of the box. If this isn't an option, CodeWarrior can also be configured to use POSIX instead of MSL (CodeWarrior refers to it as "BSD", as in FreeBSD), but it is a bit of a hassle to reconfigure the project if you aren't comfortable with CodeWarrior.
At any rate, system() is fraught with minor peril that you will need to consider; your path could have spaces, quotes, or Unicode in it, and you could be in for a world of hurt if the shell gets the wrong command. (Apple once released an iTunes update which occasionally erased hard drives due when it encountered "unusual" paths.)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Launching an Application from an Application (From: David Lalonde <email@hidden>)
 >Re: Launching an Application from an Application (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 © 2011 Apple Inc. All rights reserved.