kevinw
Programatically Adding A Property To A Class June 06, 2008 05:47PM |
BLS
Re: Programatically Adding A Property To A Class June 11, 2008 07:42PM |
property is structure _value is variant // the value _name is string // property ID _targetType is int // use wlConstants -> for instance wlEntier ( france ) end dynPropertySample is class PRIVATE _properties is dynamic array of 0 property // you can use an assoc. array too... procedure addProp(newProp is property) // add newProp to :_properties procedure getProp(pName is string) // get property by ID (pName) and convert it into _targetType // return "converted to TargetType" value procedure deleteProp(pName is string) end