Hi,
I found weird problem with Drag and Drop
code. When I power on my Macintosh
and run my application, drag and drop does not work. Although, mouse clicked event to start
the drag gets called, mouse dragging event does not seem to get reported, and I
cannot validate and accept drop. However,
when I run some other application (any other drag and drop application), and
then run my app, the drag and drop starts to work. This only happens when I reboot my
computer. Does anybody know why
this is happening? I do register my
drag and drop type as shown below:
[outlineView registerForDraggedTypes:[NSArray
arrayWithObjects:NSStringPboardType, NSFilenamesPboardType, nil]];
This
function gets called:
-
(BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items
toPasteboard:(NSPasteboard *)pboard
But not these:
- (unsigned
int)outlineView:(NSOutlineView*)ftView validateDrop:(id
<NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(int)childIndex
-
(BOOL)outlineView:(NSOutlineView*)ftView acceptDrop:(id
<NSDraggingInfo>)info item:(id)targetItem childIndex:(int)childIndex
Any help
would be greatly appreciated.
Thanks.
Kanghoon Lee