0 Replies Latest reply on Aug 23, 2012 1:58 AM by Litalk

    Calling a DCD http service constructor from <fx:Declarations> scope

    Litalk

      Hi,

       

      I've created an HttpService called EcomHttpService using the DCD http service, and added to its constructor a parameter of type string.

      Now in the mxml file I would like to call this constructor from the <fx:Declarations> scope.

      If I understand correct, the follow declaration

       

       

      <fx:Declarations> 

      <ecomhttpservice:EcomHttpService

      id="ecomHttpService"

                                                          fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"

                                                          showBusyCursor="true"/>

      ...

      Creats a new instance of EcomHttpService by calling the default constructor of EcomHttpService. How can I create the http service by calling the constructor I've added which gets a string parameter? If I don't set in the constrcutor a default value for the parameter I'm getting the abvious error of incorrect number of arguments and just can't find anywhere how can I call the constrcutor in the declaration scope.

      Thanks a lot,

      Lital.