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