Re: How drag files from an NSTableView?
Re: How drag files from an NSTableView?
- Subject: Re: How drag files from an NSTableView?
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 11 May 2003 20:42:46 +0200
At 8:39 Uhr +0100 08.05.2003, Tim Hewett wrote:
Don't forget you have to subclass NSTableView and override the
draggingSourceOperationMaskForLocal: method otherwise drags
can only be local to the table view. This is what works for me:
You also have to add the subclass to the GUI definition in Interface
Builder, otherwise the table view will still get created as NSTableView.
Tim,
thanks, I got it to work now. I wanted to be smart and made a
re-usable NSTableView subclass that took the return values for
draggingSourceOperationMaskForLocal: from instance variables. What I
forgot was to initialize them from initWithCoder: as well as from
initWithFrame: ... now that I'm doing that, everything is peachy :-)
With this, when dragged from the table view to a Finder folder, the
Finder copied /Users/timhewett/testfile to that folder.
Thanks for the hint! You folks are great, and I'm slowly beginning
to get the hang of Cocoa, I think. Now on to the next task ...
accepting drops :-9
--
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.