You can do it like this

switch( true){
     case (model instanceof DivideSentenceStep1):
              //...
     case (model instanceof DivideSentenceStep2):
              //...
     default:
              //...             
}

Cheers,
Ralf.


[EMAIL PROTECTED] wrote:
> Hey to ya all,
> 
>  
> 
> I’m trying to do following, which obviously won’t work, but is there 
> another way without having to use if else if else if else…
> 
>  
> 
> var model:Observable = 
> Observable(this._content.divideSentenceSteps.getById(indexCurrentAttempt+2));
> 
>                                   
> 
>                                   
> 
> switch(model){
> 
>             case (instanceof DivideSentenceStep2) :
> 
>                         logger.debug("DivideSenteceStep2");
> 
>                         break;
> 
>             default :
> 
>                         logger.debug("Not Known");
> 
>                         break;
> 
>             }
> 
> }
> 
>  
> 
> thx
> 
>  
> 
> *Met vriendelijke groeten,
> Lieven Cardoen**
> **MULTIMEDIALOFT | POINT X**
> **Engelse Wandeling 2 K18v | 8500 Kortrijk | T +32 (0)56/36.11.97*
> 
> *// communicatie bij voorkeur op [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>*
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to