Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-21-2010, 06:16 PM   #1
Arodicus
Senior Member
 
Join Date: Nov 2002
Location: CA
Posts: 454
Default Display component from a repeater var?

I have an array of objects I would like to use in a repeater component. One of the fields in the objects refers to the id of a component defined in the <fxeclarations> tag.

Trouble is, I have no clue how to get it to display:




ActionScript Code:
<?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:ns1="*"          xmlns:fx="http://ns.adobe.com/mxml/2009"          xmlns:s="library://ns.adobe.com/flex/spark"          xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300">         <fx:Declarations>         <ns1:CustomOne id="foo" />         <ns1:CustomTwo id="bar" />         <ns1:CustomThree id="snafu" />     </fx:Declarations>             <fx:Script>         <![CDATA[                         [Bindable] public var modules:Array;                         public function init():void {                 modules = [                     {module:foo, label:"Foo"},                     {module:bar, label:"Bar"},                     {module:snafu, label:"Snafu"},                 ];                    }                     ]]>         </fx:Script>         <mx:TabNavigator>                  <mx:Repeater id="tabs" dataProvider="{modules}">             <s:NavigatorContent label="{tabs.currentItem.label}" >                 {tabs.currentItem.module}             </s:NavigatorContent>         </mx:Repeater>     </mx:TabNavigator> </s:Group>

I tried using NavigatorContent.contentGroup too but nothing happened.

Suggestions?
Arodicus is offline   Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:45 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.