Re: [Pyobjc-dev] Does drag & drop work?
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-05-30 09:01:36
|
Dinu Gherman wrote: > 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? Where does it crash exactly? Can you post the full program? Just |