Log in

View Full Version : Drag & Drop Working But Not Showing While Dragging



dulux-oz
August 14th, 2013, 08:50
Hi Guys,

Got a funny one here - if I drag an Effect or a Modification from the relevant window using the 3.5 Ruleset the Label is displayed and dragged around the Desktop with the mouse, which also turns from a Hand back into an Arrow. However, when I do the same thing in my Ruleset (which is bassed on the 3.5 Ruleset) I don't get the Label being dragged around the Desktop and the mouse stays a Hand.

Obviously I've broken something ("If you can't take something apart and put it back together again then you don't really know it!" - My Grandfather, a Watchmaker) but I can't seem to see where I've broken it! I've done a line-by-line comparison of the Effects Window, Modifier Window and Modifier Stack code and it all matches up.

I've also had a look through the Forums and I can't seem to locate anything relevant.

Any ideas where I may have broken things?

An Update:
I just tried Draging & Droping other things around and I get the same effect - the Drag & Drag works but the "thing" being Dragged doesn't show up under the Mouse and the Mouse stays a Hand. Hmmm, looks like I've really made a hash of it.

Any and all help is (as always) greately appreciated.

Moon Wizard
August 14th, 2013, 16:35
Hmm, hard to tell without seeing, and I am out of town at Gencon as well.

Make sure you are only using onDragStart and not onDrag. The first one us called once, and the other is called multiple times whole drag is occurring.

Also, the 3.5E ruleset defines icons and description text as part of each drag. Make sure that information is set on the drag info object passed to the onDragStart event, and that the icons are defined in the ruleset (and the icon graphics are in the right spot).

Might be able to look at some code after con.

JPG

dulux-oz
August 15th, 2013, 05:35
Doh!

T'was a Font issue - I should have realised.

I had a Font Definition with a Typo in it - its amazing what the brain will figure out at 3 in the morning :-)

Thanks all