Drag and stupid Drop in NSTableView
Drag and stupid Drop in NSTableView
- Subject: Drag and stupid Drop in NSTableView
- From: Mark Stockwell <email@hidden>
- Date: Thu, 27 May 2004 00:25:54 -0500
So, I'm trying to build a document-based application that has two
NSTableViews. I'm learning cocoa and trying out this value key encoding
deal which is pretty nice when I can figure out how another piece of it
works. I've got undo working, I've got split views working, and I've
got archiving working. And all of that is pretty great.
But unfortunately, I've managed to paint myself into a corner, because
I can't figure out how to implement drag and drop inside and between my
NSTableViews. Oh, sure I've read the docs and looked at the examples.
I know I've got to registerForTypes and I've done that.
I know I've got to override methods for validatedrop, writerows,
etc..., but where do I put them?
I've got a myDocument class and I tried to put them there, but no go.
In the debugger, these methods just don't get called.
So I went to Interface Builder to the NSArrayController in my Nib file
through which everything gets connected. I thought I would "Create
Files" from the Classes menu and try to put the validate drop,
writerows, etc... methods there. But "Create Files" is grayed out.
So, how do I get drag and drop to work?
Thanks in advance for your brilliance,
Mark
_______________________________________________
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.