Hi Greg,

thank you for your suggestions, I will this discuss with the other core 
developer.

At the moment I have only the idea override the stopPropagation method, 
to avoid a copy/past:
_onMouseDown : function(e)
{
    var oldStopPropagation = e.stopPropagation;
    e.stopPropagation = function() {};

    this.base(arguments, e);

    e.stopPropagation = oldStopPropagation;
}

Cheers,
Chris

Am 07.04.2010 15:52, schrieb Greg Beaver:
> On 4/7/10 2:04 AM, Christian Schmidt wrote:
>    
>> Hi Greg,
>>
>> Thank you for answering, but I think it's like Alex sad in a other
>> thread. You have to override the behavior yourself.
>>      
> Hi,
>
> I have done this, but the problem is twofold: this is not documented
> anywhere that drag/drop doesn't work with checkboxes, and the only way
> to do this is to do bad OO by cut/pasting the entire
> _onMouseDown/_onMouseUp code minus the stopPropagation.  If any change
> were to be made to these methods, my code would need to be
> re-cut/pasted, which makes it quite brittle, defeating one of the
> primary purposes of OO.
>
> One suggestion is that _onMouseDown/_onMouseUp add a 2nd optional
> parameter like so:
>
>      _onMouseDown : function(e, stopPropagation)
>      {
>        if (!e.isLeftPressed()) {
>          return;
>        }
>
>        // Activate capturing if the button get a mouseout while
>        // the button is pressed.
>        this.capture();
>
>        this.removeState("abandoned");
>        this.addState("pressed");
>        if (null == stopPropagation) {
>          e.stopPropagation();
>        }
>      },
>
> This would allow my derived class to simply do:
>
>      _onMouseDown : function(e)
>      {
>        this.base(arguments, e, true);
>      }
>
> The second parameter would be null when called by the event callback.
>
> Alternately, it would also work simply to add a restartPropagation()
> method to the Event class.  This way, my code could be:
>
>      _onMouseDown : function(e)
>      {
>        this.base(arguments, e);
>        e.restartPropagation();
>      }
>
> Both of these solutions are better than what I am forced to do right
> now, I hope that one will make it into qooxdoo 1.0.2 :)
>
> Thanks,
> Greg
>
> ------------------------------------------------------------------------------
> 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
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>    


-- 
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
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
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to