Whoops, I didn't write this down, but I got this in my code, so it
should not be the problem.
In fact, all PHP Objects return as Flex Objects, except for Array's.
They are not translated to ArrayCollections. So the ArrayCollections
in my Flex Objects remain empty.

--- In flexcoders@yahoogroups.com, "michael_ramirez44"
<[EMAIL PROTECTED]> wrote:
>
> I don't see an $_explicitType variable in your PHP code. You need to 
> add the following to you PHP classes.
> 
> var $_explicitType = "com.app.classes.RemoteClass"; 
> var $_explicitType = "com.app.classes.RemoteClassObj"; 
> 
> 
> Michael 
> 
> --- In flexcoders@yahoogroups.com, Thomas Huijzer <thuijzer@> 
> wrote:
> >
> > Hi All,
> > 
> > With AMFPHP 1.9 I am trying to return an Object containing some 
> vars and an ArrayCollection. Inside this ArrayCollection there are 
> other Objects. But I can't get this to work in Flex.
> > For example:
> > ----------------
> > Flex class
> > ----------------
> > package com.app.classes
> > {
> >     import mx.collections.ArrayCollection;
> > 
> >     [RemoteClass (alias="com.app.classes.RemoteClass")]
> >     public class MyClass
> >     {
> >         public var id: Number;
> >         public var list: ArrayCollection;
> >     }
> > }
> > 
> > package com.app.classes
> >  {
> >     [RemoteClass (alias="com.app.classes.RemoteClassObj")]
> >      public class MyClassObj
> >      {
> >          public var id: Number;
> >          public var name: String;
> >      }
> >  }
> > ----------------
> >  PHP class
> >  ----------------
> > class MyClass
> > {
> >     var $id;
> >     var $list;
> > }
> > class MyClassObj
> > {
> >     var $id;
> >     var $name;
> > }
> > function getData()
> > {
> >     $data = new MyClass;
> >     $data->id = 1;
> >     $data->list = array();
> >     $data->list[0] = new MyClassObj;
> >     $data->list[0]->id = 2;
> >     $data->list[0]->name = "myName";
> >     return $data;
> > }
> > 
> > When I return this to Flex, the MyClass is filled ok. By the list 
> coercion fails.
> > Any idea to solve this problem?
> > Thank you.
> > 
> >  
> > ---------------------------------
> > Need Mail bonding?
> > Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
> >
>


Reply via email to