Re: instanceof validation error on checking value obects from server
Martin Wood <[email protected]>
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Message-ID | <[email protected]> |
the only times ive been suffering from that today is where i didnt have
any references to the AS2 vo's in my code.
I had imports for them, but because they were always coming from the
server, i never actually referenced one directly or instantiated one in
the AS code.
it might not be the case for you, but its worth trying just putting a
var ct:com.rbx.selfservice.model.vo.ContentTemplate;
somewhere in your code.
if its not that, i'll have a deeper look.
thanks
martin
'quite exciting this computer magic'
Jonathan Thompson wrote:
> Hi,
>
> I am currently working on a project with openAMF, and any input on this
> problem would be greatly appreciated.
>
> Jonathan
>
> Here is our situation.We are successfully sending data to and from our
> server via openAMF. Using the following code, I can walk the objects
> properties and get name/value pairs.
>
> var item = result.result;
>
> for(var prop in item)
> {
> TRACE(Flashout.DEBUG + prop + ": " + item[prop]); }
>
> However, when I attempt to validate the object's class type in Flash
> like so:
>
> TRACE(Flashout.DEBUG + "item instanceof
> com.rbx.selfservice.model.vo.ContentTemplate: " + (item instanceof
> com.rbx.selfservice.model.vo.ContentTemplate));
>
> and Flash returns false every time. This happens for any object or
> collection of objects we send across. We are sometimes taking a result
> set collection of objects and setting it as a data provider to a
> mx.controls.DataGrid component. The data will appear in the datagrid,
> however, because it is not the class type that the datagrid is
> expecting, the datagrid renders the data, but quits responding to any
> click or change events. The only way I have been able to get our data to
> work is to manually parse the server response and manually create and
> populate the corresponding value object. Once I have completed that
> process, the datagrid will render data properly and respond to events
> normally.
>
> All AS2 value objects are being successfully registered via the
> Object.registerClass(remoteObject, localObject); function.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click