Add a variable to a class instance at runtime: Difference between revisions

Content added Content deleted
Line 331: Line 331:
class Extender :: BaseExtender
class Extender :: BaseExtender
{
{
object theField.
object prop(foo) theField.
constructor new : anObject
constructor new : anObject
[
[
theObject := anObject.
theObject := anObject.
]
foo = theField.
set &foo : aValue
[
theField := aValue.
]
]
}
}