2 Replies Latest reply on Jun 11, 2007 5:55 AM by parallaxed

    Flex Remoting + Modules Bug?

    parallaxed Level 1
      TypeError: Error #1034: Type Coercion failed: cannot convert mx.messaging.messages::AcknowledgeMessage to mx.messaging.messages.IMessage.

      I have a multi-module application layout. Each module uses the Cairngorm ServiceLocator to grab the relevant RemoteObject and send RPCs to the server.

      When I switch from one module to another, and start using RPCs in the other module, this error quite often crops up.

      Where's it coming from.... and can it be fixed?
        • 1. Re: Flex Remoting + Modules Bug?
          parallaxed Level 1
          Okay. After wising up on modules I realize that all these errors are likely to be rooted in the VM creating the class definition in the wrong application domain (i.e. that of the child module and not the parent).

          I'm running FlexBuilder 2.0.1 with hotfix 2.

          Now when switching between modules, I get this error:

          VerifyError: Error #1053: Illegal override of subtopic in mx.messaging.Consumer.
          at flash.display::MovieClip/nextFrame()
          at mx.core::FlexModuleFactory/mx.core:FlexModuleFactory::deferredNextFrame()[E:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\source\mx\core\FlexModuleFactory.as:365]
          at mx.core::FlexModuleFactory/mx.core:FlexModuleFactory::update()[E:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\source\mx\core\FlexModuleFactory.as:262]
          at mx.core::FlexModuleFactory/mx.core:FlexModuleFactory::moduleCompleteHandler()[E:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\source\mx\core\FlexModuleFactory.as:454]

          I'm still keeping the application domains separate, but I'm bloating out my parent application with the classes shared between the two modules so there's no kerfuffle.

          After dismissing this, I get bucketloads of reference errors akin to:

          ReferenceError: Error #1065: Variable <x> is not defined.

          Where <x> is normally the ID of some MXML component about to be rendered.

          These errors all look way out of my hands. What's going on?
          • 2. Re: Flex Remoting + Modules Bug?
            parallaxed Level 1
            This looks like it has a lot to do with hotfix 2.

            After rolling back the SDK, the issues mentioned above got resolved.

            I should really whip up a proof-of-concept for this... It seems the hotfix needs a hotfix.

            I remember a link being posted to the board a while ago for reporting faults like this - but I can't seem to find it again. If anyone has the address, please post it.