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 > How does one get an FSSpec?

How does one get an FSSpec?
Thread Tools
Mac Elite
Join Date: Feb 2001
Location: adrift in a sea of decadent luxury and meaningless sex
Status: Offline
Reply With Quote
Sep 12, 2002, 10:03 PM
 
ok, I need to create an FSSpec in order to save a file with the Quicktime function:

Movie FlattenMovieData (
Movie theMovie,
long movieFlattenFlags,
const FSSpec *theFile,
OSType creator,
ScriptCode scriptTag,
long createMovieFileFlags);

Can anyone tell me how to create such a structure (and initialize it with actual data)?

thanks

[edit:]
little update:
I have actually managed now to get myself an FSSpec and to save an actual file, using this function from QTText, a sample app from Apple:

myErr = NavPutFile(NULL, &myReply, &myDialogOptions, myEventUPP, MovieFileType, 'TVOD', NULL);

to get a NavReplyRecord of myReply, and then

myErr = AEGetNthPtr(&(myReply.selection), 1, typeFSS, &myKeyword, &myActualType, theFSSpecPtr, sizeof(FSSpec), &myActualSize);

this gets me a valid FSSpec by passing an empty FSSpec pointed to by theFSSpecPtr. I could just work with this, except that the user has to go through a Carbon save dialog for each file to be saved. Isn't it possible to create an FSSpec from just a path?
(Last edited by lucylawless; Sep 13, 2002 at 01:06 AM. )
blackmail is such an ugly word. I prefer extortion. the X makes it sound cool
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 13, 2002, 02:24 AM
 
Take a look at the Carbon File Manager documentation. Specifically, I think you'll be interested in the functions FSPathMakeRef() and FSGetCatalogInfo().
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mac Elite
Join Date: Feb 2001
Location: adrift in a sea of decadent luxury and meaningless sex
Status: Offline
Reply With Quote
Sep 14, 2002, 12:28 AM
 
ah yes. thank you. Incidentally, I had found an example before posting this thread, of a cocoa method that used this combo, but for some reason it threw an exception on the FSGetCatalogInfo(). But it works now. I guess was using the wrong voodoo chants and hexes that day
blackmail is such an ugly word. I prefer extortion. the X makes it sound cool
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2