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



Ack, at 9/30/05, Denis @ TheOffice said:

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

You wife is a programmer as well? Or are you talking about general users? In that case, general users understand C++ classes?


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!

Actually, it's more like saying you prefer vacuum tubes to the integrated circuit because vacuum tubes were easier to teach to other people.



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

Use FSNewAlias to make an AliasHandle. These are then super easy to save to preferences.


But now I wonder, you say opening it on another system. As in opening it on another computer? Now I have to ask, why are you saving paths and expecting those to be openable on another computer? That's a really, really bad idea. Paths can change. Users move and rename things. Don't assume your users won't think they own their files.

Plus 99% of the code out there would not support that.

Code in general or your project's code?

Denis

----- Original Message -----
From: "Rosyna" <email@hidden>
To: "Denis @ TheOffice" <email@hidden>; "Laurence Harris" <email@hidden>;
<email@hidden>
Sent: Friday, September 30, 2005 9:32 AM
Subject: Re: Can't convert path ~/... to Fsref



> While I understand that your code is suffering in what it can do > because Windows is the least common denominator, what you suggest is > a horribly bad idea. FSRefs exist because they don't depend on the > path. That means they don't suffer from the fragile nature of paths. > Paths break if the user moves or renames a file or any component of > the files path. If at all possible, it's usually recommended to avoid > them or get paths Just in Time if there is no other way. > > Sadly, Paths are becoming the norm, even with their huge limitations > because in a lot of cases Cocoa is the LCD on OS X. And cocoa has > virtually no file handling APIs that work with anything but paths. > NSDocument being a notable exception that stores an FSRef internally. > > And what other systems do isn't the right way to deal with files. > It's just what they do. > > Pascal strings haven't been recommended in use in OS X since its > inception. Most of the APIs that used Pascal strings are deprecated > and if not have replacements that don't rely on Pascal Strings (such > FSRef replacing FSSpec).

--


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

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
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: Rosyna <email@hidden>)
 >Re: Can't convert path ~/... to Fsref (From: "Denis @ TheOffice" <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.