Hi,
I have defined a class with a lot of properties (about 30). There are a number of simple methods I need to write (eg clone, copy values of all properties from one instance to another, reset values of an instance, etc).
For example
package {
[Bindable]
public class Person{
public var Var1:int;
public var Var2:int;
public var Var3:String;
…
public var VarN:Boolean;
public static function copyInto(src:Person,dest:Person): void {
dest.Var1 = src.Var1;
.....
dest.VarN = src.VarN;
}
}
}
Instead of doing lots of assignments. I’d rather do something like
for each property p in Person
dest.p = src.p
I think this can be done for dynamic classes, but what about static classes?
Thanks!