Web view drag and drop problem

Kamal D Shah <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
Hi,

I have a view which has 6 web views. I basically want to be able to  
drag any of the web views to an outline view on the left of the main  
view. In the controller which is also the uidelegate I have  
implemented the following methods:

- (NSUInteger)webView:(WebView *)sender dragSourceActionMaskForPoint: 
(NSPoint)point {
	NSLog(@"Inside drag source method");
	
	return WebDragSourceActionAny;
}

- (void)webView:(WebView *)sender willPerformDragSourceAction: 
(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard: 
(NSPasteboard *)pasteboard {
	
	NSLog(@"Inside willPerformDragSourceAction");
	
	NSInteger row = [self.tableView clickedRow];
	GIWidget *draggedWidget = [self.allWidgets objectAtIndex:row];
	
	[pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType]  
owner:self];
	
	NSLog(@"Widget being dragged: %@", draggedWidget.name);
	
	[pasteboard setString:draggedWidget.name forType:NSStringPboardType];	
}

When I drag a web view, only the first method is getting called. Even  
after I drop the web view, the second method is not getting called.

Any idea why?

I confirmed that the ui delegate is set correctly.

Thanks
Kamal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.