2 Replies Latest reply on Mar 1, 2011 9:06 PM by uajmal

    'setProgress is not a function' error while setting the progress of a progress bar manually

    uajmal Level 1

      I want to set value of a progress bar in an accordian but I am encountering 'setProgress is not a function' error. Any idea what's wrong with following code.


      If I move the progress bar out of the Accordian then the error goes away and the progress bar appears fine.


      I want to set the progress bar eventually to {repMonitor.currentItem.threatLevel} but for now I am just testing with hypothetical threat value i.e 60




          <mx:Accordion id="monAccordian" includeIn="Monitoring" x="10" y="10" width="554" height="242" change="monAccordianChange()" >       
             <mx:Repeater id="repMonitor" dataProvider="{monitoringArray}">
                <mx:Canvas width="100%" height="100%" label="{repMonitor.currentItem.firstName+' '+ repMonitor.currentItem.lastName}" >
                  <mx:Image x="10" y="10" source="{repMonitor.currentItem.imageName}" width="175" height="118"/>
                    <s:Label x="200" y="14" text="Threat Level:"/>
                    <mx:ProgressBar x="200" y="30" mode="manual" label="" id="bar" width="200" creationComplete="bar.setProgress(60,100);" />