EDSidebar
EDSidebar copied to clipboard
validateDrop function is not called for each cell
- (NSDragOperation)sideBar:(EDSideBar*)tabBar validateDrop:(id<NSDraggingInfo>)sender row:(NSInteger)row
is called once you drop your cursor on the EDSideBar view and not for each cell.
I am not sure what the problem is. Could you explain it a bit more or provide some sample code with the issue?
Here is a sample. If I go on from anywhere on my screen to row 1 of sidebar, it works. But if I go from anywhere on my screen to row 1 of sidebar and then move my mouse to row 2 (without leaving sidebar), the function validatedrop will not be called for row 2.
- (NSDragOperation)sideBar:(EDSideBar*)tabBar validateDrop:(id<NSDraggingInfo>)sender row:(NSInteger)row
{
NSPasteboard* pboard = [sender draggingPasteboard];
if (row==1) {
return NSDragOperationMove;
}
if (row==2) {
return NSDragOperationCopy;
}
return NSDragOperationNone;
}