Believe me, I wouldn't be asking about this if I hadn't spent a
day-and-a-half fighting it, googling, fighting it, googling ...

>From ColdFusion, I am sending a number of objects as typed structs, which
are properly translated into their equivalent VOs on the Flex side.

But I have one that simply won't translate. (Well, worse yet, it
*did*translate - once - and then when I added one more attribute to
each side, it
broke again. But removing the attribute didn't fix it.)

I think I'm aware of most of the pitfalls that stop the translation --
because I've fallen into them.

I've made sure that the properties on both sides are exactly the same. I've
checked all the case sensitivity. I've made sure that the Remote Alias in
the VO is correct, and matches the ["__type__"] in the incoming struct. I've
made sure that an instance of the VO actually exists on the Flex side, so
it's compiled in.

I'm not sure what's left. The actual object I'm trying to translate has
child objects as well as simple properties, and those composed objects are
translated correctly into their VO types. But the main object won't
translate. Or, as I say, it did once, then stopped. (I know, I know.) What I
see in the debugger is an ObjectProxy, with all its properties (including
some correctly translated objects), but with another Object inside, which
has the same properties.

What I see in Charles seems exactly right: the object is identified
according to the ["__type__"] attribute, with all the correct properties --
including the composed objects. But no luck.

To test, I boiled down both the incoming object and the VO to the point
where they had a single property.

But no translation.

So at it's simplest: from ColdFusion I send:

<cfset ret = structNew() />
<cfset ret["__type__"] = "my.cfc.type" />
<cfset ret["myID"] = 1 />
<cfreturn ret />

... and in Flex I have:

package model
{
[RemoteClass(alias="my.cfc.type")]
[Bindable]
public class MyVO {
  public var myID:Number = 0;

  public function MyVO(){
  }

}

Has anyone run into a problem like this? Or at least, has any one seen
translation problems caused by any issues other than the common ones I
listed above?

Or should I just shoot myself?


-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Reply via email to