So this one is really weird and interesting to me.
in AHK v1 (latest version) this code creates a variable with a JSON string in it:
Code: Select all
myVar =
(Ltrim Join
{
"info": 1,
"test": 2
}
)
msgbox % myVar
Code: Select all
class test
{
myVar =
(Ltrim Join
{
"info": 1,
"test": 2
}
)
}
msgbox % test.myVar
Code: Select all
class test
{
static myVar =
(Ltrim Join
{
"info": 1,
"test": 2
}
)
}
msgbox % isObject(test.myVar) ? "True" : "False"
msgbox % test.myVar.info
Looking at the class variables documentation I see no mention of this behavior.
Can someone explain what is going on?
Note:
This does not happen in v2. as both class variables and instance variables give the same error shown above.