[Gambas-user] Drag and Drop Bug

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Sun Aug 13 08:47:23 CEST 2006


> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net
> [mailto:gambas-user-bounces at lists.sourceforge.net]On Behalf Of Timothy
> Marshal-Nichols
> Sent: Wednesday, 09 August 2006 07:46
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Drag and Drop Bug
>
>
>
>
> 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:
>

Alas with Gambas 1.9.38 you have forced people to have _Drag() and
_DragMove() events if anything is going to dropped onto a control.

I still thing there are some cases where you want to allow anything to be
dropped on to a control. To force propel to have empty _Drag() and
_DragMove() events to allow a drop onto a control just looks plain odd.

Also this behaviour will be very confusing to new users to Drag and Drop in
Gambas.


> 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.

The release of gambas 1.9.38 says:

* BUG: Drag & Drop event management has been fixed.

With Gambas version 1.9.38 options 2) and 3) do not work. Only option 4)
works. So to stop a _Drop() event you need to have both a _Drag() and
_DragMove() events and a STOP EVENT in both handlers. (May be the fault with
1) is related to the bug with 2) and 3).)

> >
> > 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
> >
> >

Thanks

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






More information about the User mailing list