views:

91

answers:

1

We are using GraniteDS autogenerated AS code to map Java remote objects to AS.

We have objects that contain List sites in Java so when they are converted to AS it looks like:

JAVA:

    private List<MyObject> territories;

Actionscript:

    private var _territories:ListCollectionView;

The trouble is we are using MXML databinding to bind the contents of that list generically, the trouble is we never reference the type of object contained in the list explicitly so it's never compiled into our SWF is there any way to ensure that objects in a list for a RemoteClass is compiled in?

+1  A: 

There is no automated way of doing this. You'll need to reference the class somewhere in your code or specify it with the compiler arguments using "include-classes".

Christophe Herreman
Ok, that's kinda what I was expecting. I guess i could customize my granite DS code generation template and have it jam in the Java generic type into a private field for the generated AS code which would kind of automate it (but introduce superfluous fields).
Dougnukem
Yes, either that or you could also generate a separate compiler config file and include it when building. That way your code will not be cluttered, but you'll depend on a specific build process.
Christophe Herreman