Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validateDrop function is not called for each cell #10

Open
redbug26 opened this issue Feb 2, 2014 · 2 comments
Open

validateDrop function is not called for each cell #10

redbug26 opened this issue Feb 2, 2014 · 2 comments

Comments

@redbug26
Copy link

redbug26 commented Feb 2, 2014

  • (NSDragOperation)sideBar:(EDSideBar*)tabBar validateDrop:(id)sender row:(NSInteger)row

is called once you drop your cursor on the EDSideBar view and not for each cell.

@erndev
Copy link
Owner

erndev commented Feb 3, 2014

I am not sure what the problem is. Could you explain it a bit more or provide some sample code with the issue?

@redbug26
Copy link
Author

redbug26 commented Feb 3, 2014

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants