> I've tried assigning the returned remote 
> object to a general AS object (see example 
> below)...that does not work....that's what
> causing these errors. 

[Pete] The hack I meant was something like this (I've not tested this,
just something I guessed might work):

static var reg:Boolean = Object.registerClass("com.MyPojo", Object);


> I tried issuing the Object.registerClass() 
> method to my Java POJO w/i my mxml file 
> where I load the Datagrid...that does not 
> work either. 

[Pete] Do you mean you tried to register "com.MyPojo" as type Object as
with the above syntax, or do you mean you tried registering it to an AS
type matching com.MyPojo? 

Object.registerClass() in general does work... there must be something
that you're not doing correctly that we can try to solve. I listed
several possible causes in my previous email. The obvious one is that
the AS representation of your Java object(s) must be linked in at
compile time (the evidence for this is the ClassUtil error that you
received when not using Object.registerClass()) in order for the player
to deserialize the type from AMF to the AS type.

If the mention of the AS class in the second parameter of
Object.registerClass doesn't seem to add a compile time dependency, can
you try adding your own dependency on the class like this:

        private var dummyVar:com.MyPojo;


> I guess I will be forced to write the AS 
> class that matches my POJO...
> ...writing the same class twice seems like 
> a poor design to me. 

[Pete] I disagree - the vast majority of RemoteObject applications that
need non-simple types have a client and server representation of
"ValueObjects". The transfer of the object over the wire is merely the
state. Many applications require client and server methods on the
object.


> After all, the datagrid was first populated 
> with an array of the SAME POJOs w/o having 
> to register any classes!!

[Pete] How so?


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to