try this:

for(item:Object in cs_Instance){
if(cs_Instance[item] == undefind){
// do something
}
}

At 12:09 PM 2/26/2005, you wrote:

I have a class with 3 variables

class cs {

public var item1;
public var item2;
public var item3;

}


I am importing this class in my main AS file and assigning values to the variables

var cs_Instance:cs = new cs();
cs.Item1 = '1';
cs.Item2 = undefined;
cs.Item3 = '3';

I want to iterate through the values of cs_Instance and make identify
which item is undefined.

for (item:Object in cs_Instance) {

if (item == undefined) {//do something}

}

THIS DID NOT WORK.

It returned the Item name from the class not the actual value. So the
value of item within the for loop is set to Item1(Item2..Item3)

I am coming from a .NET environment and this same method is fine
there. What is the solution in Flex?

Thanks,
Goran






Yahoo! Groups Sponsor ADVERTISEMENT <http://us.ard.yahoo.com/SIG=129fajdnj/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1109524202/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075> click here



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


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


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





Reply via email to