Hi Greg,
On Thursday April 1 2010 23:07:04 Greg Beaver wrote:
> It turns out that there is a small bug in the implementation of
> qx.ui.form.ToggleButton._onMouseDown which is preventing drag-and-drop
> from working. The fix?
>
> change:
>
> e.stopPropagation();
>
> to
>
> if (!this.isDraggable()) {
> e.stopPropagation();
> }
>
> at the end of the function. Do I need to open a bug report, or is this
> enough info?
I guess we can't easily fix this inside the framework. There is a reason for
this behaviour of the ToggleButton widget.
If you composite the widget with others e.g. you place a checkbox inside a
toolbar ("qx.ui.toolbar.CheckBox" is a subclass of "qx.ui.form.ToggleButton")
you need to stop the mouse event at the checkbox in order to prevent any event
handling at the parent widgets.
If you do not have such a layout/hierarchy and want to use drag and drop for
this widget the best way is to subclass it and change the default behaviour.
This has to be done in the application code because we cannot change the
default behaviour at the framework code.
> Basically what is happening is that the drag/drop handler is thwarted by
> the stopPropagation() call. In terms of unwanted side effects of
> propagating the mousedown event, if a programmer explicitly calls
> setDraggable() on a checkbox, then that is a good indication that he/she
> wants the event to propagate to the DragDrop event handler. I don't
> know much of anything about the qooxdoo internals, so perhaps there are
> some other nasty side effects that I'm not aware of? In any case, with
> my rudimentary testing, it works perfectly with the above fix.
See my comments above :)
As long as you have a specific layout this might/will work, but I guess you end
up with some unwanted side effects if you composite the widgets in a more
complex layout.
cheers,
Alex
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel