--- In flexcoders@yahoogroups.com, Darren Houle <[EMAIL PROTECTED]> wrote:
>
> Josh
>  
> Okay, so here's what I did... var person : Person = new Person(); 
person.wakeup = new Date();person.breakfast = new Date();person.lunch 
= new Date();person.dinner = null;person.bedtime = null; var wfArr : 
Array = new Array(); timeArr[0] = "wakeup";timeArr[1] 
= "breakfast";timeArr[2] = "lunch";timeArr[3] = "dinner";timeArr[4] 
= "bedtime"; var event : int;if (some criteria)      {  event = 2;  } 
if (some criteria)     {  person[timeArr[event]] = null;  }and it 
works... person.lunch... aka person["lunch"]... was set to null... 
thanks, you rock!! Darren

You could also add some code in your setters that changes the related 
variables to the correct value when the property is set.

public function set wakeup(d:Date):void{
_wakeup = d;

if (setAllFlag){
  _breakfast=_lunch=_dinner=_bedtime=d;
}
}

for instance...

HTH;

Amy

HTH;

Amy

Reply via email to