[Gambas-user] Drag and Drop Bug

Benoit Minisini gambas at ...1...
Wed Aug 16 12:38:58 CEST 2006


On Sunday 13 August 2006 08:47, Timothy Marshal-Nichols wrote:
>
> 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...>
>

Can you test with this patch please and tell me if the behaviour is correct?

The rule should do:

1) If you don't implement the Drag event handler, nor the DragMove event 
handler, then: if the Drop event handler is implemented, then the drop is 
accepted, otherwise it is rejected.

2) If you implement the Drag event handler, and if the event is stopped, then 
the drop is rejected and no DragMove event is raised.

3) If you implement the DragMove event handler, and if the event is stopped, 
then the drop is rejected.

Regards,

-- 
Benoit Minisini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CClipboard.cpp
Type: text/x-c++src
Size: 9718 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060816/b9d6d8df/attachment.cpp>


More information about the User mailing list