Drag and drop problem
Drag and drop problem
- Subject: Drag and drop problem
- From: Michael Becker <email@hidden>
- Date: Mon, 3 Apr 2006 21:41:05 +0200
Hi everybody,
although I have implemented Drag&Drop many times before, right now I
can't seem to get it right. I have an NSView subclass, here's pretty
much what I do in its -mouseDragged method:
- (void)mouseDragged:(NSEvent*)event
{
. . .
NSLog(@"%@", data);
// Get the pasteboard
NSPasteboard* pasteboard = [NSPasteboard
pasteboardWithName:NSDragPboard];
[pasteboard declareTypes:[NSArray arrayWithObject:SGPASTEBOARDTYPE]
owner:self];
[pasteboard setPropertyList:data forType:SGPASTEBOARDTYPE];
NSLog(@"%@", [pasteboard propertyListForType:SGPASTEBOARDTYPE]);
[data release];
// Start the drag
[self dragImage:dragImage at:point offset:NSZeroSize event:event
pasteboard:pasteboard source:self slideBack:YES];
}
The first NSLog prints out the contents of data (which is an
NSMutableArray), the second NSLog, however, prints out "(null)". I
really don't see what I am missing. This is just bugging the hell out
of me :-)
Maybe you got some hints?
Regards,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden