Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
Koko, Seriously, NSDragPboard is not a type. You should remove it from your array. It shouldn't hurt anything, but it will confuse you when you look at the code later. [self registerForDraggedTypes:[NSArray arrayWithObject:@"Jump"]]; Cheers, raleigh On Sep 19, 2010, at 9:26 PM, k...@highrolls

Re: Drag and Drop in Same View

2010-09-19 Thread koko
Word Up to Raleigh! Just added one of my type and voila! Thanks. -koko [self registerForDraggedTypes:[NSArray arrayWithObjects:NSDragPboard, @"Jump", nil]]; in -mouseDragged: [pboard declareTypes:[NSArray arrayWithObject:@"Jump"] owner:self]; [pboard setData:[NSData data] forType:@"Jump"

Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
NSDragPboard is the name of a pasteboard, not the dragged type. The drag type is the type of data you put on the pasteboard to drag. For example, is you are dragging a URL, then register for kUTTypeURL. If it's private data then it's along these lines: NSString *myType = UTTypeCreatePreferred

Re: Drag and Drop in Same View

2010-09-19 Thread koko
Sorry ... I did not say I had done that as follows: [self registerForDraggedTypes:[NSArray arrayWithObjects:NSDragPboard, nil]]; On Sep 19, 2010, at 7:19 PM, Raleigh Ledet wrote: You need to register as a dragging destination for your dragging type: -registerForDraggedTypes: http://de

Re: Drag and Drop in Same View

2010-09-19 Thread Raleigh Ledet
You need to register as a dragging destination for your dragging type: -registerForDraggedTypes: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html%23//apple_ref/occ/instm/NSView/registerForDraggedTypes: -raleigh On Sep

Drag and Drop in Same View

2010-09-19 Thread koko
I do dragImage:at:offset:event:pasteboard:source:slideBack: in a view's mouseDragged method. The view also implements all the correct methods for dragging as outlined in the example Erik Buck referred to. These dragging methods are never called. So what must be done to Drop in the view