En tiempo de ejecución no se le pueden añadir propiedades a una clase, pero puedes hacerlo con este pequeño truco
STProperty is Structure
_value is Variant // the value
_name is string // property ID
_targetType is int // use wlConstants por ejemplo wlEntier ( france )
END
Resize is a Class
PRIVATE
_properties is dynamic array of 0 STProperty
END
PROCEDURE addProp(newProp is STProperty)
Add(_properties,newProp)
PROCEDURE getProp(pName is string)
vReturn is Variant
// Busca la propiedad en el array y devuelve el valor
FOR EACH stAProperty OF _properties WHERE _name = pName
vReturn = stAProperty._value
BREAK
END
RESULT vReturn
PROCEDURE deleteProp(pName is string):boolean
// Busca la propiedad en el array y devuelve el valor
FOR EACH stAProperty,nIndex of _properties WHERE _name = pName
ArrayDelete(_properties,nIndex)
BREAK
END
RESULT True