[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-04-12 Thread nxzone
My ArrayCollection class ?php class ArrayCollection extends ArrayObject { var $_explicitType = flex.messaging.io.ArrayCollection; //http://weierophinney.net/matthew/archives/131-Overloading-arrays-in-PHP-5.2.0.html public function __construct($config = array()) {

Re: [flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-25 Thread Kevin
I am interested in your fix. I think it may actually be easier than my approach of having to cast the Array each time it comes back to Flex. How do you create the initial Array collection in PHP? $myArray = new ArrayCollection(); $myArray-source = array(); Or is there a different way? -

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-22 Thread thuijzer
Yes it contains up to 600 items. --- In flexcoders@yahoogroups.com, michael_ramirez44 [EMAIL PROTECTED] wrote: Does your PHP array contain more then one item when your testing? Michael Ramirez --- In flexcoders@yahoogroups.com, thuijzer thuijzer@ wrote: Whoops, I didn't write this

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-22 Thread thuijzer
It must be something basic, but I can't find it. I dubbelchecked every class Remote and in Flex. They are all the same. Locations are all the same. Now I checked what is comming from the remote server. Alle Classes are typed correct. But where there should be ArrayCollections, there are Array's,

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-22 Thread thuijzer
Finaly I found a solution for my problem. I created this class in PHP: class ArrayCollection { var $_explicitType; var $source; function ArrayCollection() { $this-_explicitType = flex.messaging.io.ArrayCollection; $this-source = array(); } } When I use

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-21 Thread thuijzer
Kevin, thank you for your response. Unfortunately it doesn't work. It also seems that this META is only used for Array's. So I am not sure it will work in my case. Thomas --- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote: you may need to use this meta tag to let Flex know what

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-21 Thread michael_ramirez44
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 [EMAIL PROTECTED]

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-21 Thread thuijzer
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

Re: [flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-21 Thread Kevin
I am guessing it must be something basic we are overlooking. I have numerous nested VOs and ArrayCollection's of VO's that get returned from PHP with no problem. As long as both the RemoteClass tag AND the $_explicitType variable are exactly the same and both point to the server location

[flexcoders] Re: Coercion failed ArrayCollection with Objects inside Object AMFPHP 1.9

2007-03-21 Thread michael_ramirez44
Does your PHP array contain more then one item when your testing? Michael Ramirez --- In flexcoders@yahoogroups.com, thuijzer [EMAIL PROTECTED] wrote: 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