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: Can't convert path ~/... to Fsref



May be I am not accustomed to these, I don't want to angry anyone.
But after a few months this is my perception.
 
CFURL function does not support "~/...'
Nor FSPathMakeRef(...);
 
 
About Pascal string :
What is the none Pascal version of :
StandardAlert(); It does not say that it is deprecated at all.
I Couldn't find one...
 
> Yes, create an alias form the FSRef and save that.
That's my point.
 
Denis
 
----- Original Message -----
From: Jerry
Sent: Friday, September 30, 2005 10:44 AM
Subject: Re: Can't convert path ~/... to Fsref


On 30 Sep 2005, at 14:25, Denis @ TheOffice wrote:

It's really no cake walk...
If I can comment about Apple engineers: They should have thought of that while making their file
functions.
I think it is a sure stopper when programmers from other sources (Like me) are confronted to that
extraneous amount of disconvergence.


If by some miracle some Apple engineers are watching these emails.
Here is a suggestion that would make having more software converted your way:

Make high end file functionality.
That means no FSRef, no FSSpec, no ParID, vRefnum... Just bare bones Path and file names in two
flavor UniChar or UTF-8, ASCII at the limit.

You mean something like: fopen, fclose, fread, fwrite? They all work with UTF-8 paths, and they're available on OS X. Or perhaps something like all the CFURL functions which will work in UTF-8 or UTF-16, and are also available on OS X.

Keep those internally to your self... That is what other systems do. Make it a black box like you
did for CFString...
And Get rid of the damn Pascal string... It was a bad idea in the 70-80's and it still is.
That would help yourself.

Pascal strings have been deprecated for years and nobody should be using them. They still have to remain for compatibility with old software.

Allow to tell you why it is the norm;
Everybody understand it. (at least those that have some minimal knowledge in computers, like my wife
for instance).
FSRefs on the hand reminds me the 70's when I was programming in binaries, had to convert manually
my assembler code.
I hated that then. Not liking it now!

But FSRefs are easy to understand, they're like having the file on the end of a piece of string rather than having a set of instructions telling you where to find it. If you want to find a file from a path you have to climb the whole file hierarchy down from the root to find the file. To find it from an FSRef, you just pull the piece of string and there it is.

Let me ask you this:
Can I save an FSRefs (0x0fe45a78) on file then retrieve it to open it on another system?

Yes, create an alias form the FSRef and save that.

Jerry


_______________________________________________
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
 _______________________________________________
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: Can't convert path ~/... to Fsref (From: Laurence Harris <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: "Denis @ TheOffice" <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: Jerry <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.