Re: Carbon vs Cocoa
Re: Carbon vs Cocoa
- Subject: Re: Carbon vs Cocoa
- From: email@hidden
- Date: Thu, 03 Oct 2002 21:45:10 +0000
>
Don't screw around with NSString. That will just cause
unexpected
>
behavior if we actually have some need to have a path that
won't change
>
for some reason. A better solution would be to make NSURL
able to use
>
an FSRef. Should be a whole lot easier than hacking around
with
>
NSString (just alter -[NSURL path] to resolve the alias and
return the
>
path, rather than mucking around with all the string-
manipulation
>
methods). Just do that, and then make the statement that
NSURL is the
>
preferred way to manipulate files more than just lip service -
make
>
NSFileManager, NSFileHandle, etc. able to take them as
input, and
>
you're in business.
>
>
Charles
With all due respect I don't think you fully grasp the issue here.
MY concern is the human interface implications of using file
paths. You cannot make an NSURL "use" an FSRef since there
is no way for the object to know when the file path has
changed. Furthermore there has to be an understanding by the
programmers that the fundamental quality of a file path is that it
is variable--not static--and can change at any time.
One option which I already suggested was to create another
file object which converts the FSRef to an NSString on the fly.
Call this object, say, NSFSRef or whatever. Thus you can
initialize an NSFSRef with an NSString argument (or hopefully
at some point an NSAlias argument) then use it as the file
primitive. Perhaps this is what you meant, but you can't change
the behavior of NSURL since it is SUPPOSED to behave like
an easily-broken URL.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.