idk about it being
the obvious solution, but is one of possible solutions, the others being:
- trying to deref the class's name back to a class object(with the caveat that whether doing that is possible would depend on the surrounding context in which the code is executed)
Code: Select all
this.msPeriod := %this.__Class%.msDefaultPeriod
- store some circular references
Code: Select all
class cBase
{
static __New() {
this.Prototype.DefineProp('MyCustomClassProperty', { Get: (*) => this })
}
...
class cInherited extends cBase
{
static msDefaultPeriod := 1000
__New(Owner, objectName, processName)
{
super.__New(Owner, objectName)
; Set up a hover timer, to check for hovering.
this.msPeriod := this.MyCustomClassProperty.msDefaultPeriod
wpb wrote: ↑29 Mar 2023, 02:44
If I were to change the name of the class, I'd have to change all references to its internal static variables.
if u were to change the name of the class, ud have to change all references period. so, moot point