[Pyobjc-dev] Does drag & drop work?
Brought to you by:
ronaldoussoren
From: Dinu G. <gh...@da...> - 2003-05-30 07:47:06
|
Hi, I'm trying to implement a drag & drop operation, much like in Hille- gass' book on pp. 261. I'm using this method (in a subclass of NSImage\ View), much like he does, but with a simpler icon to be shown during dragging: def mouseDragged_(self, event): img = NSImage.imageNamed_("myicon") p = self.convertPoint_fromView_(event.locationInWindow(), None) pb = NSPasteboard.pasteboardWithName_(NSDragPboard) pb.declareTypes_owner_([NSStringPboardType], None) pb.setString_forType_("foo", NSStringPboardType) self.dragImage_at_offset_event_pasteboard_source_slideBack_( img, p, (0,0), event, pb, self, YES) Unfortunately, it crashes with a signal 10 (SIGBUS), so I'm wondering if this is a PyObjC problem? Has anybody else implemented similar operations successfully? Thanks, Dinu -- Dinu C. Gherman ...................................................................... "Questions are never indiscreet. Answers sometimes are." (Oscar Wilde) |