In my Application i have one NSOutlineView having list of somefiles and one WebView,
User allows to drag any item from the Outline view to WebView, and on that , i am suppose to handle the database transaction,
In the Outline view , i have implemented following methods,
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard{
[self log:@"write Items”];
// Some other code to prepare the Write Item,
}
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id < NSDraggingInfo >)info proposedItem:(id)item proposedChildIndex:(NSInteger)index{
}
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id < NSDraggingInfo >)info item:(id)item childIndex:(NSInteger)index{
}
On the WebView side, i have implemented following, methods,
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender {
NSPasteboard *pboard;
NSDragOperation sourceDragMask;
[self log:@"Inside draggingEntered”];
return NSDragOperationEvery;
}
- (BOOL)prepareForDragOperation:(id < NSDraggingInfo >)sender{
}
- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender{
}
Now when i drag an element from outline view to WebView, i could see, writeItem of Outline view is getting called,
and in the Webview, DragEnter is getting called from where, i am not returning drag operation NONE, but returning NSDragoperationEvery,
The problem is that, i am not getting method, prepareForDragOperation and PerformDragOperation,
Can anyone help me please,
Kind Regards
Rohan
Hi guys
Thanks for Looking over it, It got resolved by overriding
Though in the document it was mentioned as an option and if its not implemented, it will take the return values from dragEnter Method,
perhaps for My own data type, it would have got NONE form WebView method and working once i overwrite it.
Kind Regard Rohan