We are working on a set of data transfer objects where we have 
matching server-side java classes and client-side AS classes.  Some 
of these DTO contain lists of other DTOs.  As an example:

A.java:
    public class A {
       ....
       List<B> blist
       ...
    }

In A.as we have...
    class A {
       ....
       public var blist : ArrayCollection;
       ....

And we have B.java and B.as

Then we have a RemoteObject call to pull down a bunch of A 
objects....

Here's the problem, Flex does not compile B.as at build-time.

So if B.as has a compiler problem, you never know about it, except 
that the 'blist' in A never gets populated.   If you break down the 
data transfer and debug it.  You find that during RemoteObject call, 
the blist data comes "down the wire", but as an ArrayCollection 
generic Objects, they never get turned into instances of Bs... 

I am guessing that this is happening because at compile time, there 
is not direct reference to B in the clientside project.  Our 
covering .mxml wants one or more A objects, and inside A the blist 
is an ArrayCollection.  So the compiler doesn't see a reference to 
B.. 

So anyone know how we can fairly seamlessly make sure B.as gets 
compiled at build time so we'd know of compiler issues with it 
rather than spending lots of time debugging mysterious null values?

(This appears to happen whether the project is set to compile on the 
client-side or the server-side.  We are using Flex and FDS 2.0.1 and 
Java 1.5)


Reply via email to