Bem, eu acho que o maior problema é o fato de que no mxml parece que não dá 
(não imagino porque) pra atribuir ids no runtime.
Se trocares para a propriedade name verás que dá certo. Se 
olhares na classe UIComponent, verás que não tem diferença entre os métodos pra 
setar e pegar o id e o name :P

Eu, como faço as coisas no AS, não chego a ter esse problema...

De qualquer forma, vi dois problemas a mais nesse codigo:
1. new Array(10) não é [Bindable] Declara ele em outro lugar
2. Como vais atribuir como dataProvider do teu LinkBar uma viewstack que nem 
tem nome ainda?

É o que eu consigo fazer.
Se alguém tiver a explicação de porque não dá pra setar id no runtime (no MXML) 
podia compartilhar aqui com os meros mortais :P



 
Gabriela Trindade Perry - http://www.gabriela.trindade.nom.br



> Date: Wed, 18 Jun 2008 13:07:39 -0700
> Subject: [flexdev] Ajuda com repeater - Avaliar Varivavel
> From: [EMAIL PROTECTED]
> To: flexdev@googlegroups.com
> 
> 
> Quero passar esse bloco de código que tem uns 15 semelhantes usando o
> repeater
> 
> 
> <!--repeater de 10-->
> <mx:HBox width="100%" height="100%">
> 
> <mx:LinkBar direction="vertical"
> dataProvider="{viewStack_{repeat.currentIndex}}" />
> 
> <mx:ViewStack id="{'viewStack_'repeat.currentIndex}" width="100%"
> height="100%">
> 
> <mx:Canvas label="Relatório {repeat.currentIndex}"
> icon="@Embed('assets/images/report.png')" width="100%" height="100%">
> 
> 
> </mx:Canvas>
> 
> </mx:ViewStack>
> 
> </mx:HBox>
> <!--repeater de 10-->
> 
> 
> 
> Tentei usar o seguinte código
> 
> 
> 
> <mx:Repeater dataProvider="{new Array(10)}" id="repeat">
> 
> <!--repeater-->
> <mx:HBox width="100%" height="100%">
> 
> <mx:LinkBar direction="vertical"
> dataProvider="{viewStack_{repeat.currentIndex}}" />
> 
> <mx:ViewStack id="viewStack_{repeat.currentIndex}" width="100%"
> height="100%">
> 
> <mx:Canvas label="Relatório {repeat.currentIndex}"
> icon="@Embed('assets/images/report.png')" width="100%" height="100%">
> 
> 
> </mx:Canvas>
> 
> </mx:ViewStack>
> 
> </mx:HBox>
> <!--repeater-->
> 
> </mx:Repeater>
> 
> Aparece o erro
> 
> 'viewStack_{repeat.currentIndex}' is not a valid identifier.
> 
> Como devo proceder ?
> 
> 
> 
> 
> 
> 
> 
> 
> > 

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para flexdev@googlegroups.com
Para sair da lista, envie um email em branco para [EMAIL PROTECTED]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a