1 Reply Latest reply on Dec 22, 2010 10:09 AM by Flex harUI

    Remote Class Mapping

    dataDash Level 1

      This may be just me or possibly a bug in Flex, I have a remote class and a local class and using AMFPHP the classes should map in Flex without a problem and it works... but only if I have a reference to the local class somewhere in the script block.



      For example:

      If I request an array of Employee objects they are returned as Employee objects from AMFPHP and mapped correctly as long as in the script block I have a reference to Employee even if its not used.


      public var employee:Employee = new Employee



      Remove this reference and the objects are mapped to object Object not object Employee - I'm I going crazy or is this strange behaviour from Flex, can anyone shed any light on why this might happen and how to stop it?


      Many Thanks,




      UPDATE: Think I have cracked it - its because there is no refrence so even with an import statment the compiler does not include the file and therefore it cannot map to that class. Now I just need to figure out a way to force the compiler to include the file...


      Message was edited by: dataDash