Re: Drag between 2 NSTableView?
Re: Drag between 2 NSTableView?
- Subject: Re: Drag between 2 NSTableView?
- From: Todd Freese <email@hidden>
- Date: Thu, 24 Aug 2006 20:10:45 -0500
It is tied to an NSArrayController for it's dataSource. However, I
tried adding [self setDataSource:self]; in it's awakeFromNib but it
does not work.
Todd
On Aug 24, 2006, at 7:58 PM, Colin Doncaster wrote:
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_______________________________________________________________
_______
______________________________________________________________________
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