I haven't tried it but it might work.
 
1.    In your View MXML
 
<loginView:LoginViewHelper name="{myHelper}" view="{this}"/>
 
<mx:Script>
 <![CDATA[
             
        public var myHelper : String;    
        
   ]]>
 </mx:Script>
 
2.    From repeater
 
<mx:Script>
 <![CDATA[
             
        private var i : Number;
        i = 0;
 
        private function getNextName () : String
        {
            i = i + 1;
            return "helper" + i;
        }        
   ]]>
 </mx:Script>
 
<mx:repeater>
    <app:mychildView myHelper="{getNextName()}">
</mx:repeater>
 
3.    now the commands can use ViewLocator to get whatever helper they want.
 
I'm not sure if that's the best way to do it but it should get you going.
 
Thanks


From: Omar Ramos [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 31, 2005 9:53 AM
To: [email protected]
Subject: RE: [flexcoders] Cairngorm Question.

Anyone?
 
Omar Ramos
Itacon Corporation
Technology Manager


From: Omar Ramos [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 8:18 PM
To: [email protected]
Subject: [flexcoders] Cairngorm Question.

Hi all,
 
I am using the Cairngorm plataform but had a small question. How can I use the viewhelper technique when I attach view dynamicaly? For example I have a mxml component and put a view helper attached to it and use this component on a repeater and 5 instances are made. When I call the getViewHelper method which of those 5 reference will it give me? Any help would be apreaciated.
 
 
 
Omar Ramos
Itacon Corporation
Technology Manager



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

----
This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com


Reply via email to