just change from private to public in your function, and it will works.
Regards.
Hello,
Looking for a little help as far as best practices for filtering a
navigator (togglebuttonbar, buttonbar) from a viewstack data provider.
Each viewstack is a canvas and I only want to present the selection in
the togglebuttonbar IF the XML node which contains the data for the
canvas exists.
Right now I'm using .addChild and .removeChild on the togglebuttonbar
to control which buttons are displayed. That works the firs time the
app loads, but as the user changes the data source (tied to a textbox
that loads a different xml file) it breaks. I'm thinking there is a
way to control which viewstate elements are displayed from within a
dataprovider, but having issues with that.
Right now, this is the XML event result handler source code:
<mx:Script>
private function XMLDPHandler(event:ResultEvent):void {
pcXMLDP = new XML(event.result);
bbNavigate.removeAllChildren();
if (pcXMLDP.nodename1.length() > 0) {
bbNavigate.addChild(vsNavigate .getChildByName("nodename1"));
}
else {
bbNavigate.removeChild(vsNavigate .getChildByName("nodename1"));
}
</mx:Script>
And this is the viewstack / navigator components MXML:
<mx:ToggleButtonBar x="10" y="70" id="bbNavigate" width="475" />
<mx:ViewStack x="10" y="100" id="vsNavigate" width="475" height="235">
<mx:Canvas id="nodename1" label="Node 1" width="325" height="100">
<mx:Label text="Node 1 text test"
fontWeight="bold" left="0" top="0"/>
<mx:ComboBox id="cmbCriteria" width="200"
dataProvider="{pcXMLDP.nodename1.criteria}"
labelField="@Name" left="108" top="15"/>
</mx:Canvas>
<mx:Canvas id="nodename2" label="Node 2" width="325" height="100">
<mx:Label text="Node 2 text test"
fontWeight="bold" left="0" top="0"/>
<mx:ComboBox id="cmbRank" width="200"
dataProvider="{pcXMLDP.nodename2.rank}"
labelField="@Name" left="108" top="15"/>
</mx:Canvas>
</mx:ViewStack>
</mx:Canvas>
Any help would be appreciated....
Thx
--
----------------------------
Igor Costa
www.igorcosta.com __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Reply via email to

