Re: NSNumber pointerValue
Re: NSNumber pointerValue
- Subject: Re: NSNumber pointerValue
- From: Glenn Andreas <email@hidden>
- Date: Wed, 19 Nov 2003 11:03:55 -0600
But this is just speculation, of course. Maybe someone at Apple
wants to clarify, but probably not. You could test further by
seeing if your original object can get a non-nil value back *after*
placing the NSNumber into the pasteboard. If it can, then either
(a) I'm wrong or (b) the trigger happens when the value is
retrieved, not set.
I tried to get a non-nil value back after placing it on the
pasteboard and it woked like a charm. But still on the otherside of
the darkness of the pasteboard it returns nil.
Is there any documentation of under wich circumstances pointerValue
would return nil? I assumed it was a simple conversion of types, but
apparently not...
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).
--
Glenn Andreas email@hidden
Theldrow, Blobbo, Cythera, oh my!
Be good, and you will be lonesome
_______________________________________________
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.