Hi Alex,

for "App counter" I'm referring to the example in MDLExample or the same in
MDLRadioButton example that I uploaded for Peter and you to check.

I'm saying that click is working as you said, internaly to the class. I
don't recognize the code diff you post.

this is the last one:

COMPILE::JS
        override public function addEventListener(type:String,
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object =
null):void
        {
            if (type == "click")
            {
                icon.addEventListener("click", clickHandler, false);   <--
this is working ok
            }
            else
            {
               super.addEventListener(type, handler);
            }
        }

and

COMPILE::JS
        public function clickHandler(event:Event):void
        {
            selected = !selected;   <-- this is called too as I click a RB
        }

as I click In a radio button, I see clickHandler is called, but, in my App
the event is not reaching since the counter is not incremented

I mean here one instance of RadioButton in the App is like this:

<mdl:RadioButton groupName="g2" text="Black" click="counter7++"/>

<js:Label text="RadioButtons throw 'click' event {counter7} times"/>

and the label is not getting incremented.

Hope is more clear now

Thanks


2017-02-03 0:41 GMT+01:00 Alex Harui <aha...@adobe.com>:

> What is the "App counter"?
>
> Without taking Piotr's or your changes and just doing the changes below,
> the click event counter increments as expected.
>
> -Alex
>
> diff --git
> a/frameworks/projects/MaterialDesignLite/src/main/
> flex/org/apache/flex/mdl/
> RadioButton.as
> b/frameworks/projects/MaterialDesignLite/src/main/
> flex/org/apache/flex/mdl/
> RadioButton.as
> index 0366013..001c587 100644
> ---
> a/frameworks/projects/MaterialDesignLite/src/main/
> flex/org/apache/flex/mdl/
> RadioButton.as
> +++
> b/frameworks/projects/MaterialDesignLite/src/main/
> flex/org/apache/flex/mdl/
> RadioButton.as
> @@ -321,7 +321,7 @@ package org.apache.flex.mdl
>              (icon.element as WrappedHTMLElement).flexjs_wrapper = this;
>              (radio as WrappedHTMLElement).flexjs_wrapper = this;
>
> -            element.addEventListener("click", clickHandler, false);
> +            //element.addEventListener("click", clickHandler, false);
>
>              return element;
>          };
> @@ -464,6 +464,15 @@ package org.apache.flex.mdl
>                  }
>              }
>          }
> +
> +               override public function addEventListener(type:String,
> handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object =
> null):void
> +               {
> +                       if (type == "click")
> +                               icon.element.addEventListener(type,
> handler, opt_capture);
> +                       else
> +                               super.addEventListener(type, handler,
> opt_capture, opt_handlerScope);
> +               }
> +
>          /**
>           * @param e The event object.
>           */
>
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Reply via email to