Skip navigation.
 
mlRe: FSSpec from NSString Problems
FROM : Rosyna
DATE : Sun Jan 26 21:37:47 2003

It means file not found or fnfErr. (MacErrors.h)

If you're doing this from NSSavePanel, then that path will not exist.
And you *cannot* get an FSRef from a nonexistent path.

what you need to do is make an FSRef to the parent folder -[filePath
stringByDeletingLastPathComponent], then call FSGetCatalogInfo with
kFSCatInfoNodeID and kFSCatInfoVolume. The node ID is the dirID of
the folder. the volume is the vRefNum. Pass these to FSMakeFSSpec
with the name of the file as a Pascal String. A pascal string is a
256 byte char array with the first element being the size of the
array.

Ack, at 1/26/03, Jonathan Sick said:

>An example of an NSString returned by by NSSavePanel would be:
>/Users/jsick/Movies/myMovie.mov
>
>So when I do:
>OSStatus status = FSPathMakeRef((unsigned const char *)[inPath
>fileSystemRepresentation],&fsref, NULL);
>
>The FSPathMakeRef returns an OSStatus value of -43. I'm not familiar
>at all with OSStatus definitions. I did a search on Apple's site,
>but  couldn't find any info on a -43 error. Any pointers to
>documentation on this error?


--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlFSSpec from NSString Problems Jonathan Sick Jan 26, 10:24
mlRe: FSSpec from NSString Problems Rosyna Jan 26, 11:13
mlRe: FSSpec from NSString Problems Jonathan Sick Jan 26, 21:17
mlRe: FSSpec from NSString Problems Rosyna Jan 26, 21:37
mlRe: FSSpec from NSString Problems Sascha Kujawa Jan 26, 21:56
mlRe: FSSpec from NSString Problems Mike Shields Jan 26, 22:00
mlRe: FSSpec from NSString Problems Lorenzo Puleo Jan 29, 18:00