I know one can override a calculated property in a subclass by simply redefining the calculated property. Is there any way to revert back from a calculated to non-calculated property (value property or member access or whatever the correct term is)? I've tried various ways, but I keep getting the "property is read-only error". I'm guessing there's a way to do this, but I haven't figured it out. Illustrative code below:
Code: Select all
class top {
someprop => 'somecalc'
; and other features
}
class special extends top {
someprop := ''
__new(val) {
this.someprop := val
} ;wants to override someprop but keep other features of top
}
s := special.new(10)
msgbox s.someprop
Any help would be much appreciated!