Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Launching Packaged Applications

Launching Packaged Applications
Thread Tools
kupan787
Senior User
Join Date: Jun 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Jun 22, 2001, 12:48 AM
 
I am trying to launch packaged applications (that is what they are called, right? They are the applications where if you control click on them is says Show Package contents). But the code I am using (carbon code, not cocoa) only launches normal applications. Here is a snipit of my code:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
Str255 myString;
LaunchParamBlockRec myLaunchParams;
FSSpec mySpec;
FindFolder(0x8000, 'favs', false, &myVRef, &myDirID);
c2pstrcpy( myString, myVec[menuItem-<font color = blue>1</font>].c_str());
FSMakeFSSpec(myVRef, myDirID, (<font color = green>const</font> <font color = green>unsigned</font> <font color = green>char</font> *)myString, &mySpec);
myLaunchParams.launchBlockID = extendedBlock;
myLaunchParams.launchEPBLength = extendedBlockLen;
myLaunchParams.launchFileFlags = <font color = blue>0</font>;
myLaunchParams.launchControlFlags = launchContinue + launchNoFileFlags;
myLaunchParams.launchAppSpec = &mySpec;
myLaunchParams.launchAppParameters = <font color = green>nil</font>;
LaunchApplication(&myLaunchParams);
</font>[/code]

I am betting there is a cleaner way of doing this, but if not, please let me know how to add to this packaged application launching.

[ 06-22-2001: Message edited by: kupan787 ]
     
honeydew
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status: Offline
Reply With Quote
Jun 22, 2001, 02:29 AM
 
Have you considered using LaunchServices?
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:53 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,