2 Replies Latest reply on Dec 7, 2009 2:08 AM by Wiouou

    How to include implicitely referenced class in swf?

    Wiouou

      I have a setup where livecycle returns an array filled with instances of class MyClass with, among others, property aName.  MyClass implements MyInterface which has an accessor name, in the implementation MyClass name handles aName.  A component listens to an ArrayCollection filled with this array and its labelField property is set to name.

       

      What happens next is a guess but seems plausible to me.  Due to the fact MyClass is not referenced in the application, I don't need it for the dataprovider, it isn't included in the swf file.  The result is an array not filled with MyClass instances but with Object instances with the aName property because livecycle seems to use a failover strategy where dynamic objects will be created if the class can't been found.  This results in an error for the component because the labelField doesn't exist here.

       

      My question is: is there a way to force Flex to include files?  I know I can handle this with changing the labelField but I want to stick to my design.