Re: Carbonish aliases for Cocoa?
Re: Carbonish aliases for Cocoa?
- Subject: Re: Carbonish aliases for Cocoa?
- From: email@hidden
- Date: Sun, 1 Dec 2002 17:21:15 -0800
At 6:36 PM -0600 12/1/02, Chris Hanson wrote:
>
At 11:58 PM +0000 12/1/02, m wrote:
>
>Sorry, I bit new at Cocoa so bear with me...
>
>
>
>By "storable in an NSDictionary" I meant that you should be able to write the dictionary out to disk and restore it later, and still be able to reconstitute the member objects. I was under the impression that in order to be saveable/restorable in this fashion, objects needed conform to the NSCoding protocol. Is this not correct?
>
>
Ah. That makes sense. If you're referring to storing the NSDictionary as an XML property list, NSCoding won't even do what you want. In that case, what you'll want to do is get an NSData from a BDAlias object and use that in your dictionary. Then, when you need to use it as an alias, just create a temporary BDAlias object with that data.
>
>
-- Chris
InternetConfig stores aliases in its XML property list preferences. Be sure to avoid resolving Aliases yourself since they are supposed to be an arbitrary description of how to find a file, not a specific format.
Apple really needs to redo Cocoa's filesystem handling. The current POSIX-based system hampers the human interface. NSDocument behaves like an FSRef (since 10.1), but asking Cocoa developers to use NSDocuments for all file i/o is too much.
Perhaps if I authored a replacement for NSFile like NSMacFile which could be serialized as an alias for persistent or IPC use, people would use it?
_______________________________________________
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.