In article <uce-88022B.07205301062007@[EMAIL PROTECTED]
>,
Gregory Weston <uce@[EMAIL PROTECTED]
> wrote:
> In article <465fb6ab$0$14071$742ec2ed@[EMAIL PROTECTED]
>,
> Don Bruder <dakidd@[EMAIL PROTECTED]
> wrote:
>
> > Oh, to bring things back on-topic, Bo's suggestion (the FSFindFolder()
> > function) is working perfectly - toss the resulting FSRef for the
user's
> > homedir to FSRefMakePath() to get ThePath in a form I can tinker with,
> > strcat(&ThePath, "/Client.log") to tack the filename onto it, run
> > ThePath back into FSPathMakeRef(), and I've got exactly what I need,
> > working exactly as wanted. Minimal heartburn, maximal function - Gotta
> > love it :)
>
> If all you're doing is trying to build a reference to a file within a
> known directory, you can do it in one shot with this instead of
> converting to path, appending the leaf name, and converting back to ref.
>
> OSErr FSMakeFSRefUnicode (
> const FSRef * parentRef,
> UniCharCount nameLength,
> const UniChar * name,
> TextEncoding textEncodingHint,
> FSRef * newRef
> );
>
>
> Only 1 line to debug and only one error code to check.
Doesn't that shove me (kicking and screaming every inch of the way...)
into fiddling with unicode, which in turn forces me (kicking harder, and
screaming louder) to deal with the god-awful abortion of CFString?
(Call me a throwback, or whatever, but I *HATE* the hassle of trying to
deal with CFString stuff - particularly since I have almost zero
expectation that this code will ever want to run on a machine that
speaks anything other than plain old ASCII English)
--
Don Bruder - dakidd@[EMAIL PROTECTED]
- If your "From:" address isn't on my
whitelist,
or the subject of the message doesn't contain the exact text
"PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without
my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd>
for more
info


|