Did you try to remove the "this." Part, when I want to change a state in the 
component/or application I just put currentState and it works fine. 

 

Also check your code to see if you're not pointing any component like Datagrids 
or comboboxs to an out of range index.

Atenciosamente,

Daniel Fernandes Credidio
Tecnologia da Informação
Grupo Santa Clara - Análise e Desenvolvimento. 
Rua Santa Clara, 100 - Parque Santa Clara
Eusébio - CE - 61760-000
T  +5585 4006-5613 
[EMAIL PROTECTED]

 

De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em nome de Nicolas 
Boulet-Lavoie
Enviada em: sexta-feira, 25 de abril de 2008 14:51
Para: flexcoders@yahoogroups.com
Assunto: RE: [flexcoders] Re: currentState question

 

Derrick,

 

Yes, even if I write :

 

this.currentState = 'frmLogin';

 

I'm getting the same error.

 

I will explain further my application design.

 

<mx:Application 

                xmlns:mx="http://www.adobe.com/2006/mxml";

                xmlns:perso="components.*"

                layout="absolute" 

                creationComplete="init()">

 

On creationComplete event, it enters the init() method.

 

public function init():void {

                this.currentState = 'frmLogin';

// Removed content //

}

 

So, as soon as the application load, it's not in the base state but in another 
specified state (here, frmLogin). Is this design can cause the above problem?

 

The state switch is called in a callback method of a http service object which 
is :

 

private function handFermerSession(p_objEvent:ResultEvent):void {

                try {

                               this.currentState = 'frmLogin';

                } catch( err:Error ) {

                               Alert.show(err.message.toString());

                }

}

 

I hope it's more clear...

 

Thanks

 

Nicolas

 

 

De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Derrick 
Anderson
Envoyé : 25 avril 2008 13:41
À : flexcoders@yahoogroups.com
Objet : Re: [flexcoders] Re: currentState question

 

i'm with ghus32, if you only have 2 states, why not just use the currentState = 
'statename' ?  do you still get an error with that?

d.

On Fri, Apr 25, 2008 at 1:22 PM, Nicolas Boulet-Lavoie <[EMAIL PROTECTED]> 
wrote:

Hello guys,

 

Thank you for your quick reply. I'm still getting the 2006 error even with your 
suggestions.

 

Here is the structure of my states :

 

-          <Base state>

o   frmAppGestion

o   frmLogin (start)

 

I try to reset the state when I'm in the frmAppGestion state.

 

But, there is something weird with the state stack. In the state manager, as 
you can see, there are 3 states (base, frmAppGestion and frmLogin).

 

Here is my code :

 

      <mx:states>

            <mx:State name="frmAppGestion">

                  // Removed content //

            </mx:State>

            <mx:State name="frmLogin">

                  // Removed content //   

            </mx:State>

      </mx:states>

 

As you can see, they are only 2 states not 3. Maybe, this is the problem?

 

Thanks

 

Nicolas

 

De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Andrew 
Wetmore
Envoyé : 25 avril 2008 12:49
À : flexcoders@yahoogroups.com
Objet : [flexcoders] Re: currentState question

 

The other possibility is that the problem comes from using double
quotation marks ("") instead of single(''). currentState likes single
quotation marks.

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , 
"Dmitri Girski" <[EMAIL PROTECTED]> wrote:
>
> Bonjour,
> 
> I am pretty sure that this error comes as a consequence of changing
> the state. You should check what happens when you change the state -
> probably you trying to access an element which does not exist in the
> base state.
> 
> Cheers,
> Dmitri.
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , 
> "Nicolas Boulet-Lavoie"
> <nicolasboulet@> wrote:
> >
> > Hello,
> > 
> > 
> > 
> > When I try to use this VERY easy command :
> > 
> > 
> > 
> > currentState = ""
> > 
> > 
> > 
> > I'm getting this error.
> > 
> > 
> > 
> > Error #2006: L'index indiqu� sort des limites.
> > 
> > 
> > 
> > Any idea why?
> > 
> > 
> > 
> > -- 
> > 
> > Merci et bonne journ�e,
> > 
> > 
> > 
> > Nicolas Boulet-Lavoie, Webmestre/Webmaster
> > 
> > --------------------------------
> > 
> > L A P R I S E �
> > 
> > T�l: 248-8886 poste 288
> > 
> > nicolasboulet@
> > 
> > 
> > 
> > http://www.maisonlaprise.com/
> > 
> > http://www.habitaflex.com/
> > 
> > http://www.lorendo.com/
> > 
> > http://www.tomindustries.com/
> > 
> > --------------------------------
> > 

 

 

Reply via email to