2 Replies Latest reply on Jun 3, 2008 6:52 AM by thais.flory

    Can't bind a variable to a RemoteObject component / destination property?

      I have this RemoteObject in my mxml:
      <mx:RemoteObject id="roCommId" destination="{conversionDestination}"

      This variable declaration in the corresponding ActionScript (AS):
      public var conversionDestination:String = AppUtil.CONVERSION_DESTINATION;

      And this constant declaration in my AS class AppUtil:
      public static const CONVERSION_DESTINATION:String = "IntermediaryConversionEnvironment";

      And I get this error:
      [MessagingError message=''null' is not a valid destination.']
      at mx.messaging::MessageAgent/set destination()
      at mx.rpc::AbstractService/set destination()
      at components::PartnerComp/::_RemoteObject2_i()
      at components::PartnerComp$iinit()
      at mx.core::Container/createComponentFromDescriptor()
      at mx.core::Container/createComponentsFromDescriptors()
      at mx.containers::ViewStack/::instantiateSelectedChild()
      at mx.containers::ViewStack/mx.containers:ViewStack::commitProperties()
      at mx.core::UIComponent/validateProperties()
      at mx.managers::LayoutManager/::validateProperties()

      Does mxml require that the destination property of a RemoteObject be either hard coded or left off and then initialized in AS code?

      Thank you.