Re: Drag and Drop a pointer?
Re: Drag and Drop a pointer?
- Subject: Re: Drag and Drop a pointer?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Wed, 21 May 2003 23:31:45 +0200
At 23:10 Uhr +0200 21.05.2003, Markus M|ller wrote:
my next problem ist how do i get my object onto the pasteboard? it
is an object inherited from nsobject and i'm not sure how to convert
it to nsdate without loosing the pointer to my original object!?!?
You can put several flavors on the pasteboard. So, put the NSDate on
it, and some other flavor indicating your object.
in simple words: is there a way to transfer a pointer via drag and drop?
I have no idea how it's done officially. What I did was simply put
the pointer in an NSNumber, and then put that NSNumber on the
pasteboard with a flavor type I invented myself. Not very pretty, but
in my case it worked, because I only put it on the pasteboard for
local drags, which means it won't accidentally get stored on disk by
the Finder and I suddenly get a stale pointer when it's dragged back
in two days later.
NB - "flavor" is Carbon-speak for the pasteboard type, or whatever
its called (like NSFilenamesPboardType or whatever)... sorry if I'm
confusing anyone, but I'm still learning Cocoa.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.