Re: Drag between 2 NSTableView?
Re: Drag between 2 NSTableView?
- Subject: Re: Drag between 2 NSTableView?
- From: Colin Doncaster <email@hidden>
- Date: Fri, 25 Aug 2006 10:58:22 +1000
Do you have this class set as your data source as well? Not just the
delegate?
On 25-Aug-06, at 10:49 AM, Todd Freese wrote:
I am. In the target NSTableViews I have:
- (void)awakeFromNib
{
[self setDelegate:self];
[self registerForDraggedTypes:[NSArray
arrayWithObjects:@"SS_dragRows", nil]];
[self setVerticalMotionCanBeginDrag:YES];
}
Todd Freese
The Filmworkers Club
On Aug 24, 2006, at 7:45 PM, Colin Doncaster wrote:
It should call
- (NSDragOperation)tableView:(NSTableView*)tableView
validateDrop:(id )info
proposedRow:(int)row
proposedDropOperation:(NSTableViewDropOperation)op
and
- (BOOL)tableView:(NSTableView*)tableView
acceptDrop:(id )info
row:(int)row
dropOperation:(NSTableViewDropOperation)op
as you state, which would solve your row issue, have you made sure
that you've registered the target NSTableView for the dragged types?
On 25-Aug-06, at 10:23 AM, Todd Freese wrote:
I am trying setup drag & drop between two NSTableViews. I am
getting - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)
sender calls when the mouse enters the destination NSTableView.
But I am not sure how I would figure out which row they dropped
on. Both NSTableViews are bound to array controllers.
Also, I thought that the destination NSTableView would call:
-(NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id
<NSDraggingInfo>)info proposedRow:(int)row proposedDropOperation:
(NSTableViewDropOperation)op
- or -
-(BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id
<NSDraggingInfo>)info row:(int)row dropOperation:
(NSTableViewDropOperation)operation
but it does not.
Am I missing something here. I could not find any archived
messages for this.
I tried subclassing NSTableView and override:
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
{
return NSDragOperationCopy;
}
but it does not help.
Thanks,
Todd Freese
The Filmworkers Club
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40colindoncaster.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40filmworkers.com
This email sent to email@hidden
_____________________________________________________________________
_
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/
email________________________________________________________________
______
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden