3 Replies Latest reply on Aug 4, 2008 10:38 PM by Zal

    Very strange Type Coercion Error...

    Zal Level 1
      Hi every one,

      I ran into trouble with my refactor application. This code is used inside a loaded module with the ModuleManager...

      Aren't they the exact same package and Class ?!?!?

      (copy/paste from Flex Console)
      TypeError: Error #1034: Type Coercion failed: cannot convert com.terrainmarketing.stv.common.vo::NoteVO@15231881 to com.terrainmarketing.stv.common.vo.NoteVO.
      at com.terrainmarketing.stv.modules.directory.view.renderers::NoteListRenderer/get note()[/Users/duch/Documents/Flex Builder 3/STV_1.0_Pipes/src/com/terrainmarketing/stv/modules/directory/view/renderers/NoteListRen derer.mxml:63]

      I am ... What's going on and how can I "repair" this?

      thanks all!
        • 1. Re: Very strange Type Coercion Error...
          Level 7

          "Zal" <webforumsuser@macromedia.com> wrote in message
          news:g78els$6p6$1@forums.macromedia.com...
          > Hi every one,
          >
          > I ran into trouble with my refactor application. This code is used inside
          > a
          > loaded module with the ModuleManager...
          >
          > Aren't they the exact same package and Class ?!?!?
          >
          > (copy/paste from Flex Console)
          > TypeError: Error #1034: Type Coercion failed: cannot convert
          > com.terrainmarketing.stv.common.vo::NoteVO@15231881 to
          > com.terrainmarketing.stv.common.vo.NoteVO.
          > at
          > com.terrainmarketing.stv.modules.directory.view.renderers::NoteListRenderer/get
          > note()[/Users/duch/Documents/Flex Builder
          > 3/STV_1.0_Pipes/src/com/terrainmarketing/stv/modules/directory/view/renderers/No
          > teListRenderer.mxml:63]
          >
          > I am ... What's going on and how can I "repair" this?

          http://tech.groups.yahoo.com/group/flexcoders/message/120785


          • 2. Re: Very strange Type Coercion Error...
            Zal Level 1
            Very interesting !

            Found this link too, that helps understand: blogs.adobe.com/aharui/…

            Now one more question: if I use the SharedCode technic, I must build my project with command-lined mxmlc or there is a trick with the setup of FlexBuilder ?
            because not every developers are made equally... in my team at least.
            • 3. Re: Very strange Type Coercion Error...
              Zal Level 1
              Well, I have tried to use mxmlc but it won't be that for tonight. I would need to use an XML as a directive for an ant task, but I never done that (and I don't ever know what I just write means...), and it's very late in the night, I have to finish this project tomorrow.
              I wont create a SharedCode.swf module.

              Instead, and it looks like it's working, I will use all my common modules classes in my main app, somewhere in the initialization process.
              I'm using the pureMVC mutlicore framework and its Pipe utility.

              And of course when I load my modules, I pass the main application's domain to them.

              Here's my code: