[Gambas-user] Drag and Drop Bug

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Wed Aug 9 08:45:54 CEST 2006



Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net
> [mailto:gambas-user-bounces at lists.sourceforge.net]On Behalf Of Benoit
> Minisini
> Sent: Tuesday, 08 August 2006 20:59
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Drag and Drop Bug
>
>
> On Tuesday 08 August 2006 10:11, Timothy Marshal-Nichols wrote:
> > Hello,
> >
> > The bug seems to be back where you can not cancel a drop event with STOP
> > EVENT.
> >
> > After setting the property Drop to TRUE you should be able to drag items
> > onto a control. If you use STOP EVENT in the _Drag() event this should
> > cancel the _Drop() event. I have some code like this to cancel
> the _Drop()
> > event:
> >
> > 	IconView1_Drag()
> > 		IF Drag.Format <> myFormat THEN STOP EVENT
> > 	END
> >
> > If you put this code in the Drag event you can see it is called. But it
> > does not stop the _Drop() event being called. This example should always
> > cancel the Drop event.
> >
> > 	IconView1_Drag()
> > 		PRINT "Stop drag"
> > 		STOP EVENT
> > 	END
> >
> > I think there was this bug sometime in the past. And I thought
> it has been
> > fixed. Looks like it has come back.
> >
> > I am sure the bug is in these controls:
> >
> > 	ListView
> > 	IconView
> > 	ListBox
> >
> > Possibly others.
> >
> > I am not in that much hurry to have this bug fixed. Just
> thought you might
> > like to know and put it on your TO-DO list.
> >
> > Thanks
> >
> > 8-{)} Timothy Marshal-Nichols
> > <mailto: timothy.marshal-nichols at ...247...>
> >
> >
>
> This should be fixed in the next release.
>
> The behaviour will be the following:
>
> 1) If you don't implement the Drag event handler, nor the DragMove event
> handler, then the drop is rejected.
>

Are there not a few cases where you might accept **anything** that is
dropped on a control? In this case you would only have a Drop event. With 1)
you would have to implement a dummy Drag (or DragMove) event that did
nothing. Might it be better to say:

1) If you don't implement the Drop event handler then the drop is rejected.

The rest looks good.

> 2) If you implement the Drag event handler only, then the drop is
> rejected
> only if you use STOP EVENT.
>
> 3) If you implement the DragMove event handler only, then the
> drop is rejected
> only if you use STOP EVENT.
>
> 4) If you implement both Drag and DragMove event handlers, then
> the drop is
> rejected if you use STOP EVENT in both handlers.
>
> Regards,
>
> --
> Benoit Minisini
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>






More information about the User mailing list