Drag operations and AppKit views
Drag operations and AppKit views
- Subject: Drag operations and AppKit views
- From: Steve Ivy <email@hidden>
- Date: Sat, 28 Sep 2002 08:38:52 -0700
I'm trying to add drag-n-drop to my application, following the sample
code found here:
http://ranchero.com/software/netnewswire/rssclipboard.php
This example (like Cocoa Programming for Mac OS X) uses a custom view
as the drag destination - presumably b/c it's the simplest to
demonstrate with. If I add this veiw to my project, I can add it to my
application's GUi and it works. So far so good. However, if I want to
use any other kind of existing NSView as my drag destination, nothing
works right. I've tried NSTextField, NSimageView, even NSTabView
(trying to get the contentRect to highlight) to no avail.
In each case I added the drag operation code from RSSDropView.m (in the
above sample code) to a subclass of the particular view I was trying,
and adjusted the drawRect: method for each one (to perform some sort of
highlighting). But it seems that none of these subclassed views
actually *get* the drag messages called on them.
Of course there's something I'm not seeing here - can anyone give me
some direction?
--Steve
_______________________________________________
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.