Re: can't archive NSValue (actually, can't keyed-archive NSValue)
Re: can't archive NSValue (actually, can't keyed-archive NSValue)
- Subject: Re: can't archive NSValue (actually, can't keyed-archive NSValue)
- From: Kirk Kerekes <email@hidden>
- Date: Tue, 25 Apr 2006 08:40:09 -0500
NSValue does not support keyed-archiving.
At all.
Really.
I consider this a bug, at least with respect to the "standard"
NSValue concrete subclasses created by valueWithRect: valueWithPoint:
valueWithRange: and valueWithSize:.
I assume that the lack of keyed-archiving support has mostly to do
with cross-platform in-memory representation issues, but the
"standard" NSValue types can easily be robustly archived as NSStrings
using NSStringFromXXX functions, and original "flat" archiving is
supported on all NSValues, and is reportedly cross-platform-robust in
most non-pathological cases.
IMHO, NSValue needs to be explicitly factored into its "standard"
subset (as above) and its non-standard arbitrary-data-object subset,
with the standard set supporting keyed archiving and the non-standard
set possibly not. It should be possible to keyed-archive any concrete
NSValue subclass that supports (as yet undefined) -
stringRepresentation and -initWithStringRepresentation: methods.
This poorly documented issue can affect anyone who attempt to keyed-
archive standard Cocoa objects like NSPrintInfo, NSAttributedString's
"DocumentAttributes" dictionary, or similar structures that contain
NSRange, NSPoint, NSRect or NSSize data.
This has been reported as a bug (years ago) by myself, but it appears
to need many more such reports to get any actual action.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden