You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Maria Jose Esteve <mj...@iest.com> on 2020/05/28 09:59:50 UTC

States

Hello good day,
I want to use currentState, in my jewel ApplicationResponsiveView, and I need to retrieve the value of stateGroups but I can't get it because apparently it is not populated in the creation of the states Array, I always retrieve undefined.

Possibly I am leaving something unspecified ...


  1.  Definition

    <j:states>
        <js:State name="noinit" stateGroups="normal"/>
        <js:State name="init" stateGroups="normal"/>
        <js:State name="start" stateGroups="normal"/>
        <js:State name="normal" stateGroups="normal"/>
        <js:State name="filter" stateGroups="normal"/>
        <js:State name="order" stateGroups="normal"/>
        <js:State name="search" stateGroups="normal"/>
        <js:State name="add" stateGroups="editing" />
        <js:State name="edit" stateGroups="editing" />
        <js:State name="start" />
        <js:State name="update" />
    </j:states>


  1.  Bead

    <j:beads>
        <js:ContainerDataBinding/>
<js:SimpleStatesImpl/>
    </j:beads>


  1.  The first time I change the currentState the contents of the array is:

var icur:int = -1;
                for each (var s:State in states){
                    icur++;
                    if(currentState == s.name){
                        iCurrentState = icur;
                        trace("["+icur.toString()+"]  gr: "+ s.stateGroups + "\\" + s.name);
                    }else{
                        trace("gr: "+ s.stateGroups + "\\" + s.name);
                    }
                }

                [cid:image001.png@01D634E7.7D030D10]

Can you see what I'm missing or what I'm doing wrong?

Thx
Hiedra.


RE: States

Posted by Maria Jose Esteve <mj...@iest.com>.
Sorry, the only attribute that doesn't catch me is "stateGroups”, sorry.

[cid:image002.png@01D63520.F9601EA0]


De: Maria Jose Esteve <mj...@iest.com>
Enviado el: jueves, 28 de mayo de 2020 18:34
Para: users@royale.apache.org
Asunto: RE: States

Well,
that update has indeed solved a problem I had with the binding 😝  but it has not solved this problem for me.
It seems that creating the js: State does not pass all the properties to the structure that it then exposes. I have put some breakpoints in the code and I only see that the "set name" is done but not the "set stateGroups" nor the "set overrides".
I have only been able to debug to the GroupBase but I have not been able to know where the js: State are being created from within j: states. How could I see this?

Thanks Carlos.

Hiedra.

De: Carlos Rovira <ca...@apache.org>>
Enviado el: jueves, 28 de mayo de 2020 16:58
Para: users@royale.apache.org<ma...@royale.apache.org>
Asunto: Re: States

Hi Maria Jose,

could you try again. I just closed this ticket [1] since I saw it working. I suppose is due to some fixes in bindings done today by Greg.

Please try it with the new changes and report back if you continue seeing problems :)

[1] https://github.com/apache/royale-asjs/issues/843#event-3383191618

El jue., 28 may. 2020 a las 12:00, Maria Jose Esteve (<mj...@iest.com>>) escribió:
Hello good day,
I want to use currentState, in my jewel ApplicationResponsiveView, and I need to retrieve the value of stateGroups but I can't get it because apparently it is not populated in the creation of the states Array, I always retrieve undefined.

Possibly I am leaving something unspecified ...


  1.  Definition

    <j:states>
        <js:State name="noinit" stateGroups="normal"/>
        <js:State name="init" stateGroups="normal"/>
        <js:State name="start" stateGroups="normal"/>
        <js:State name="normal" stateGroups="normal"/>
        <js:State name="filter" stateGroups="normal"/>
        <js:State name="order" stateGroups="normal"/>
        <js:State name="search" stateGroups="normal"/>
        <js:State name="add" stateGroups="editing" />
        <js:State name="edit" stateGroups="editing" />
        <js:State name="start" />
        <js:State name="update" />
    </j:states>


  1.  Bead

    <j:beads>
        <js:ContainerDataBinding/>
<js:SimpleStatesImpl/>
    </j:beads>


  1.  The first time I change the currentState the contents of the array is:

var icur:int = -1;
                for each (var s:State in states){
                    icur++;
                    if(currentState == s.name<http://s.name>){
                        iCurrentState = icur;
                        trace("["+icur.toString()+"]  gr: "+ s.stateGroups + "\\" + s.name<http://s.name>);
                    }else{
                        trace("gr: "+ s.stateGroups + "\\" + s.name<http://s.name>);
                    }
                }

                [cid:image001.png@01D63520.78FAB450]

Can you see what I'm missing or what I'm doing wrong?

Thx
Hiedra.



--
Carlos Rovira
http://about.me/carlosrovira


RE: States

Posted by Maria Jose Esteve <mj...@iest.com>.
Well,
that update has indeed solved a problem I had with the binding 😝  but it has not solved this problem for me.
It seems that creating the js: State does not pass all the properties to the structure that it then exposes. I have put some breakpoints in the code and I only see that the "set name" is done but not the "set stateGroups" nor the "set overrides".
I have only been able to debug to the GroupBase but I have not been able to know where the js: State are being created from within j: states. How could I see this?

Thanks Carlos.

Hiedra.

De: Carlos Rovira <ca...@apache.org>
Enviado el: jueves, 28 de mayo de 2020 16:58
Para: users@royale.apache.org
Asunto: Re: States

Hi Maria Jose,

could you try again. I just closed this ticket [1] since I saw it working. I suppose is due to some fixes in bindings done today by Greg.

Please try it with the new changes and report back if you continue seeing problems :)

[1] https://github.com/apache/royale-asjs/issues/843#event-3383191618

El jue., 28 may. 2020 a las 12:00, Maria Jose Esteve (<mj...@iest.com>>) escribió:
Hello good day,
I want to use currentState, in my jewel ApplicationResponsiveView, and I need to retrieve the value of stateGroups but I can't get it because apparently it is not populated in the creation of the states Array, I always retrieve undefined.

Possibly I am leaving something unspecified ...


  1.  Definition

    <j:states>
        <js:State name="noinit" stateGroups="normal"/>
        <js:State name="init" stateGroups="normal"/>
        <js:State name="start" stateGroups="normal"/>
        <js:State name="normal" stateGroups="normal"/>
        <js:State name="filter" stateGroups="normal"/>
        <js:State name="order" stateGroups="normal"/>
        <js:State name="search" stateGroups="normal"/>
        <js:State name="add" stateGroups="editing" />
        <js:State name="edit" stateGroups="editing" />
        <js:State name="start" />
        <js:State name="update" />
    </j:states>


  1.  Bead

    <j:beads>
        <js:ContainerDataBinding/>
<js:SimpleStatesImpl/>
    </j:beads>


  1.  The first time I change the currentState the contents of the array is:

var icur:int = -1;
                for each (var s:State in states){
                    icur++;
                    if(currentState == s.name<http://s.name>){
                        iCurrentState = icur;
                        trace("["+icur.toString()+"]  gr: "+ s.stateGroups + "\\" + s.name<http://s.name>);
                    }else{
                        trace("gr: "+ s.stateGroups + "\\" + s.name<http://s.name>);
                    }
                }

                [cid:image001.png@01D6351A.B10B06C0]

Can you see what I'm missing or what I'm doing wrong?

Thx
Hiedra.



--
Carlos Rovira
http://about.me/carlosrovira


Re: States

Posted by Carlos Rovira <ca...@apache.org>.
Hi Maria Jose,

could you try again. I just closed this ticket [1] since I saw it working.
I suppose is due to some fixes in bindings done today by Greg.

Please try it with the new changes and report back if you continue seeing
problems :)

[1] https://github.com/apache/royale-asjs/issues/843#event-3383191618

El jue., 28 may. 2020 a las 12:00, Maria Jose Esteve (<mj...@iest.com>)
escribió:

> Hello good day,
>
> I want to use currentState, in my jewel ApplicationResponsiveView, and I
> need to retrieve the value of stateGroups but I can't get it because
> apparently it is not populated in the creation of the states Array, I
> always retrieve undefined.
>
>
>
> Possibly I am leaving something unspecified ...
>
>
>
>    1. Definition
>
>
>
>     <j:states>
>
>         <js:State name="noinit" stateGroups="normal"/>
>
>         <js:State name="init" stateGroups="normal"/>
>
>         <js:State name="start" stateGroups="normal"/>
>
>         <js:State name="normal" stateGroups="normal"/>
>
>         <js:State name="filter" stateGroups="normal"/>
>
>         <js:State name="order" stateGroups="normal"/>
>
>         <js:State name="search" stateGroups="normal"/>
>
>         <js:State name="add" stateGroups="editing" />
>
>         <js:State name="edit" stateGroups="editing" />
>
>         <js:State name="start" />
>
>         <js:State name="update" />
>
>     </j:states>
>
>
>
>    1. Bead
>
>
>
>     <j:beads>
>
>         <js:ContainerDataBinding/>
>
> <js:SimpleStatesImpl/>
>
>     </j:beads>
>
>
>
>    1. The first time I change the currentState the contents of the array
>    is:
>
>
>
> var icur:int = -1;
>
>                 for each (var s:State in states){
>
>                     icur++;
>
>                     if(currentState == s.name){
>
>                         iCurrentState = icur;
>
>                         trace("["+icur.toString()+"]  gr: "+ s.stateGroups
> + "\\" + s.name);
>
>                     }else{
>
>                         trace("gr: "+ s.stateGroups + "\\" + s.name);
>
>                     }
>
>                 }
>
>
>
>
>
>
>
> Can you see what I'm missing or what I'm doing wrong?
>
>
>
> Thx
>
> Hiedra.
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira