Hi List,

I use some complex Remote Objects. Let me give an example:

class Phones{
    public var number:String;
    public var info:String;
}

class Person{
 
    public var   name:String;
    public var firstname:String;
    public var phones:Array;

}

These are only example classes. In my app they are more complex and of 
course I uses Object.registerClass().

The phones array in the Person class contains some Phones Objects. Let's 
say I have a Person object ApplicationPerson in my app and 
ApplicationPerson is filled with values by a remote call. There is 
absolutely no problem to access ApplicationPerson.name and 
ApplicationPerson.firstname, but when I try to fill a DataGrid with 
ApplicationPerson.phones nothing is shown. There are objects in 
ApplicationPerson.phones but it seems the information which type of 
objects are in it is gone.
The only possibility I found to access ApplicationPerson.phones is to 
put a getPhones method in the class Person in which I cast every item in 
phones. getPhones could look like this:

public function getPhones():Array{
    var ret:Array = new Array();
    for(var i=0; i < phones.length; i++){
        ret.push(Phones(phones[i]);
    }
    return ret;
}

Is a explicit getter-method the onliest chance to deal with complex 
Remote Objects or is there a possibility of "deep-cast" Flex does on its 
own?

Greets
Christoph


-- 
****************************************
 Christoph Guse
 L�hstra�e 34
 41747 Viersen
 Tel.  0 21 62 / 50 24 066
 Mobil   01 72 / 160 74 84
 VoIP  0 12 12 / 39 64 48 831
****************************************



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to