alias is the default property for [RemoteClass], so you don't need to
explicitly write it (just like, say, Embed source)
Patrick
Kevin a écrit :
>
> thank you. Here is where I was making my mistake (in case others are
> having the same problem):
>
>
> when declaring the $_explicitType variable, I was mistakenly putting
> the path to the variable in my Flex dir rather than the path in my PHP
> dir.
>
>> var $_explicitType = "com.one.of. my.flex.customVO" ;
>
> should have been:
>
>> var $_explicitType = "com.one.of. my.customVO" ;
>
> I don't know why, but I guess I thought I should tell PHP where my
> Flex VO was...like it cares!
>
> Anyway, thank for setting me straight.
>
> BTW, I have always seen the [RemoteClass( "com.one. of.my.customVO"
> )] write with "alias =".
>
> [RemoteClass( alias= "com.one. of.my.customVO" )]
>
> Is this a typo or is the alias optional?
>
> thanks, Kevin
>
>
>
> On Jan 15, 2007, at 6:09 PM, Patrick Mineault wrote:
>
>> Sure thing. If you want to return an array of com.one.of.my. customVO,
>> then say the php class is:
>>
>> <?php
>> class customVO
>> {
>> //Declare variables below
>> var $_explicitType = "com.one.of. my.customVO" ;
>> }
>> ?>
>>
>> PHP doesn't support packages, so to send the full package name to Flash
>> you have to set the $_explicitType variable. The value of $_explicitType
>> should be the same as that of [RemoteClass] , ie:
>>
>> package com.one.of.my
>> {
>> [RemoteClass( "com.one. of.my.customVO" )]
>> class customVO
>> {
>> //Stuff in here
>> }
>> }
>>
>> Then the rest is done for you. So for example:
>>
>> function getArrayOfCustomVo( )
>> {
>> return array(new customVO(), new customVO());
>> }
>>
>> That's pretty much all there is to it.
>>
>> Patrick
>>
>> Kevin a écrit :
>> > 1) Is is possible to return results from AMFPHP and have them easily
>> > assign Value Objects on the Flex Client? (if so, how)
>> >
>> > EXAMPLE:
>> > call service to ask for an array of VO data.
>> > AMFPHP returns array of PHP Data(Value) Objects in result event.
>> > How do I then map the items in the VO array to a Flex VO? Is this
>> > possible?
>> >
>> > I thought I could use something like this to do it,
>> > [ ArrayElementType ( "com.one.of. my.customVO" )]
>> > but I am not sure where to put this?? or how to use it properly.
>> >
>> > 2) Is it bad form to give Cairngorm Value Objects custom getters &
>> > setters to handle some basic data manipulation tasks?
>> >
>> > I have been doing this in my unit testing, but now that I am trying to
>> > connect to AMFPHP to return the data, the getters & setters are
>> > useless because the Flex VO is being ignored.
>> >
>> >
>> > Thanks for your help.
>> >
>> > - Kevin
>> >
>>
>
>