4 Replies Latest reply on Mar 22, 2011 11:23 PM by Tanu Jain

    what's wrong of these code?

    tsper

      i have a mysql database exbtn: id, name, text, value,    and php file "getExbtnByID"

      i want put a name in a label's text, so...

       

      <fx:Script>
        <![CDATA[
         import mx.controls.Alert;
         import mx.events.FlexEvent;  
         protected function label2_creationCompleteHandler(event:FlexEvent):void
         {
          getExbtnByIDResult.token = exbtnService.getExbtnByID("exBtn02");         //"exBtn02" is the name of table exbtn   
         }  
        ]]>
      </fx:Script>


      <fx:Declarations>
        <s:CallResponder id="getExbtnByIDResult"/>

        <exbtnservice:ExbtnService id="exbtnService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> 
      </fx:Declarations>


      <s:Label x="214" y="195" text="{getExbtnByIDResult.lastResult.name}" width="448" height="132" id="label2" creationComplete="label2_creationCompleteHandler(event)"/>
      </s:WindowedApplication>

       

      but it's wrong, who can tell me why, thanks!!!