Unable call "class variable" from "variable"
Posted: 19 Oct 2019, 02:48
It works in normal variables, but not in class variable.
Is there a way to make it work?
I think it is the problem of the ".", also tried use "`.", not working either.
Is there a way to make it work?
I think it is the problem of the ".", also tried use "`.", not working either.
Code: Select all
Class VarContainer
{
static vv_TestVar
}
VarContainer.vv_TestVar := "Default"
msgbox % VarContainer.vv_TestVar
; RESULT:
; Default
; -------------------------------------------------------------
temp3 := "Default"
temp1 = temp3
%temp1% := "NEW"
msgbox % temp3
; RESULT:
; NEW
; -------------------------------------------------------------
VarContainer.vv_TestVar := "Default"
temp1 = VarContainer.vv_TestVar
%temp1% := "NEW"
msgbox % VarContainer.vv_TestVar
; RESULT:
; Error: The following variable name contains an illegal character:
; "VarContainer.vv_TestVar"