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



Thank you for understanding, it is hard enough as it is, I can go without being constantly judge all
the time.

I am aware even more now (Thanks to this mail group)  that Pascal string, FSSpec, is far from ideal
and IT IS schedule to be replace ASAIC.
That is exactly why I am trying to generalize that functionality so I can just swap it, without
affecting the rest of the code.
Which by the way must remain portable to Windows, that is not an easy task let me assure you.

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.
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.

Thank you for watching.

P.S. If you think that this is too much work: That! is laziness my friends.

Denis Co


----- Original Message ----- 
From: "Laurence Harris" <email@hidden>
To: "Denis @ TheOffice" <email@hidden>; <email@hidden>
Sent: Thursday, September 29, 2005 9:38 PM
Subject: Re: Can't convert path ~/... to Fsref


> On 9/29/05 8:18 PM, Denis @ TheOffice didst favor us with:
>
> > No, I am not lazy, it is a choice!
> > And my soft is much more solid than you may think.
>
> I should apologize. I don't know the circumstances surrounding this project.
> You may be working on something where the choice is not yours to make, in
> which case you have my sympathies.
>
> Regardless of whose choice this is, the plain and simple fact is that you're
> mixing two things that do not mix well, and those are 31-character Pascal
> strings and POSIX paths. If the FSSpec you're populating is only used as a
> struct to hold the information in its fields and you're using the name field
> to hold a UTF-8 string, then you might be okay most of the time. But if the
> FSSpec you're populating is going to be passed to any File Manager APIs, you
> should expect some users to have problems. I'm not aware of anyone using a
> full 255 characters in file names in Mac OS X, but 32 or more is not that
> uncommon, and that's enough to break an FSSpec.
>
> As for that pesky tilda, there are lots of simple ways to address that,
> including writing a very small function yourself. I suspect it wouldn't be
> more than a dozen lines of code.
>
> Larry
>
> >
> >
> > ----- Original Message -----
> > From: "Laurence Harris" <email@hidden>
> > To: "Denis @ TheOffice" <email@hidden>; <email@hidden>
> > Sent: Thursday, September 29, 2005 8:02 PM
> > Subject: Re: Can't convert path ~/... to Fsref
> >
> >
> >> On 9/29/05 8:02 PM, Denis @ TheOffice didst favor us with:
> >>
> >>> Yeah, but the only thing that goes in a FSSpecs is a Pascal string, I am not
> >>> liking it either. But there is not seems to be any alternative that would
> >>> easily fit in the code I am working on.
> >>
> >> Ah yes, the programmer's eternal conundrum: Write code that's easy, or write
> >> code that works all the time? Hmmm, let me think...
> >>
> >> Larry
> >>
>

 _______________________________________________
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>)



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.