Re: NSNumber pointerValue
Re: NSNumber pointerValue
- Subject: Re: NSNumber pointerValue
- From: Björn Carlström <email@hidden>
- Date: Wed, 19 Nov 2003 19:00:16 +0100
Well, the pasteboard is normally used to pass data into a different
application, and once out of your applications, pointer values are
meaningless, so it seems reasonable for the value to become nil (since
I believe the NSValue is archived when put on the pasteboard, and when
unarchived it would have no sense of what the correct value for a
pointer value is (since it (NSValue) doesn't know if it is in the same
application), so it becomes nil).
I cannot agree that it seems reasonable for the value to become nil.
NSValue and NSNumber takes a value in a variety of forms and then
performs converions to different types. To refuse to make a certain
conversion after being archived seems like a safety feature. Sure the
pointer could be invalid, but believe me, in my case passing nil is
more invalid. I also don't believe the pasteboard is designed with a
preferenece to local or non local passing of data.
Bjvrn
_______________________________________________
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.