Hi all,
This is a job where I try to put a map into an array an then read it
back. Somewhere I must be doing something wrong. How is it possible
that the values are disapeared when I try to read them back? Does
anyone have a clue?
--thanks in advance--

static void mapInArray(Args _args)
{
array myArray;
map myMap, tmpMyMap;
mapIterator mi;
;

//create an array to hold a struct
myArray = new array (types::Class);
myMap = new Map(Types::String,types::container);

//set some values in the map
myMap.insert("field1", "test1");
myMap.insert("field2", "test2");
myArray.value( 1, myMap);

//Read the values into a map
tmpMyMap = myArray.value(1);

mi = new mapIterator(tmpMyMap);
while (mi.more())
{
    //Show the stored values
    info (mi.toString());
    mi.next();
}

}



Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to