forget about it, 

forgot that vs.selectedIndex is a 0 based index. 



--- In flexcoders@yahoogroups.com, "joao_m_fernandes"
<[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I'm getting a weird behavior with a tree that should switch the layout
> based on the selectedNode.
> 
> something like this:
>       
> 
> mx.controls.Alert.show((tree.selectedNode.getData().property1 ==
> undefined).toString())
>       if (tree.selectedNode.getData().property1 == undefined){
>       vs.selectedIndex=1; 
>       }else{
>       vs.selectedIndex=2;
>       }
> 
> what is very weird is that the
> mx.controls.Alert.show((tree.selectedNode.getData().property1 ==
> undefined).toString()) evaluates correctly true & false values but in
> the if part, the script goes always on vs.selectedIndex=1...
> 
> Am I missing something?
> 
> João Fernandes




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to