Hello all.

Well Im performing a drag-ndrop between views of the same app, I implemented the - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender method, because I need to know the location of the mouse so I can place the image in the correct position of the view. But weirdly after converting the point to the currentview there was a gap of about 145ox in x coordinate and 45 px in the y coord, those values are not even close to where the view resides in the window. So what I did to fix the problem was the following.

- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
{
        NSPoint converted = [NSEvent mouseLocation];
        actualDragPoint = [self convertPoint:converted fromView:nil];   
        actualDragPoint.x = actualDragPoint.x - 144 ;
        actualDragPoint.y =  actualDragPoint.y -76;             
        return NSDragOperationMove;
}

it fixed the problem, but Im wondering why is this happening?


Any clues?

Thanks

Gustavo

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to