New to drag and drop
New to drag and drop
- Subject: New to drag and drop
- From: Mark Thomas <email@hidden>
- Date: Mon, 21 Apr 2008 21:23:25 +0100
- Thread-topic: New to drag and drop
Hi,
I'm looking to add in drag and drop support to my app, but one thing which
isn't clear at the minute, is whether you are suppose to subclass the
NSViews or use delegates to do this. I would have assumed delegates as makes
the most future proof solution, so I added a
[webWindow registerForDraggedTypes:[NSArray
arrayWithObjects:NSFilenamesPboardType,nil] ];
as I'm interested in file's being dropped on me, and I had an existing
delegate on my window, as was tracking movement ..etc, so added in
@implementation Controller(NSDraggingDestination)
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
{
return TRUE;
}
I then put a breakpoint here, awaiting to get called via the debugger but
it didn't happen when I drop a file on my window, so I'm wondering
1) I have a webkit control which covers the whole window, would the drop
message be sent to the parent ?
2) Or should I be putting operating this on the Webkit control ?
3) Should I be adding more drag delegates, but the doc's say that you didn't
need any other as were optional.
I have seen the drag/drop example but its assumes you have subclassed
control, which why I'm wondering about this.
Thanks
Mark.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden