for (var key:* in myObject)
{
  var value:* = myObject[key];
}

for..in does keys, for each..in does values.

-Josh

On Tue, Jul 29, 2008 at 5:07 PM, cyrill.zadra <[EMAIL PROTECTED]>wrote:

> Hi everybody,
>
> The debug log of BlazeDS shows that the java.util.HashMap get's
> converted to an Object.
>
> *** debug log ***
> [BlazeDS]07/29/2008 [DEBUG] [Endpoint.AMF] Serializing AMF/HTTP response
> Version: 3
>  (Message #0 targetURI=/2/onResult, responseURI=)
>    (Externalizable Object #0 'DSK')
>      (Typed Object #1 'test.MyValue')
>        s = "TEST"
>        params = (Object #2)
>          sys_attribute_n1 = 1.0
>          sys_object_tbl_obj_name = "Test Value"
> *** debug log ***
>
> So on the Flex side I can store this value only in attribute with type
> Object.. is this correct?
>
> If yes how can access the attributes of my object if they are dynamic
> as hashmaps usually are?
>
> o.sys_attribute_n1 //static access
>
> I need somethin like this (dynamic access).
>
> for each(String attribute in o.getAttributesOfObject())  {
>  trace(o[attribute]).
> }
>
> Does anybody know how to access dynamic attribute?
>
> thanks a lot and regards
>
> cyrill
>
>
>
> --- In [email protected], "cyrill.zadra" <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi,
> >
> > Well I'm have some troubles using a HashMap on the server-side.
> >
> > I use a java remote custom object, which contains a hashmap as one of
> > its attributes. The custom object should be converted to the
> > ActionScript object MyValue when it's getting transfered to the client.
> >
> > But on the client-side I always geht a error.
> >
> > ***TypeError: Error #1034: Typumwandlung fehlgeschlagen:
> > [EMAIL PROTECTED] kann nicht in Array umgewandelt werden.***
> >
> > Which is the correct ActionScript type for the HashMap?
> >
> > #### Java Class ####
> > package test;
> > import java.util.HashMap;
> >
> > public class MyValue {
> >       public String s;
> >       public HashMap<String,Object> params;
> > }
> > ####################
> >
> >
> > #### ActionScript Class ####
> >       [RemoteClass(alias="test.MyValue")]
> >       public class MyValue
> >       {
> >               public function MyValue() { trace("MyValue Constructor"); }
> >
> >               public var s : String;
> >               public var params : Array;
> >
> >               public function toString() : String
> >               {
> >                       return s + " - " + params;
> >               }
> >       }
> > ############################
> >
> > thx & regards
> >
> > Cyrill
> >
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to