[flexcoders] Adding tabs dynamically

2009-04-01 Thread markgoldin_2000
I am having a problem adding tabs to tabnavigator. While I am going in one 
order tabs are generated in a different then mine. Here is some code although 
it's simplified:
// Scan thru scanning each zone and add as many as needed
zoneNumber = resultXML.children().length();
currentZone = 0;
createNextTab(resultXML);
private function createNextTab(resultXML:XML):void
{   
if (currentZone  zoneNumber) 
{
node = resultXML.zoneconfiguration[currentZone];
var Tab:boxing = new boxing();
Tab.id = node.lineid.toString(); 
Tab.label = Boxing Area  + Tab.id +  
 ;
Tab.paramObj.lineid = node.lineid;  

Tab.attachJobInProgress(boxingareas);

callLater(createNextTab, [resultXML]);
currentZone++;
}
}
resultXML looks very simple: nodes with lineid.

Tab.paramObj.lineid drives IDs of tabs.
While I am going from 1 to 6, Tabs have a random order: mostly 2, 1, 

Hope my problem is clear.

Thanks



Re: [flexcoders] Adding tabs dynamically

2009-04-01 Thread Sam Lai
How are you adding the tabs to the tabnavigator?

2009/4/2 markgoldin_2000 markgoldin_2...@yahoo.com:
 I am having a problem adding tabs to tabnavigator. While I am going in one 
 order tabs are generated in a different then mine. Here is some code although 
 it's simplified:
 // Scan thru scanning each zone and add as many as needed
 zoneNumber = resultXML.children().length();
 currentZone = 0;
 createNextTab(resultXML);
 private function createNextTab(resultXML:XML):void
                        {
                                if (currentZone  zoneNumber)
                                {
                        node = resultXML.zoneconfiguration[currentZone];
                var Tab:boxing = new boxing();
                                        Tab.id = node.lineid.toString();
                                        Tab.label = Boxing Area  + Tab.id + 
   ;
                                        Tab.paramObj.lineid = node.lineid;
                                        Tab.attachJobInProgress(boxingareas);

                                        callLater(createNextTab, [resultXML]);
                                        currentZone++;
                                }
 }
 resultXML looks very simple: nodes with lineid.

 Tab.paramObj.lineid drives IDs of tabs.
 While I am going from 1 to 6, Tabs have a random order: mostly 2, 1, 

 Hope my problem is clear.

 Thanks



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links