quote:
Originally posted by CookieRevised
quote:
Originally posted by Mattike
quote:
Originally posted by CookieRevised
Short answer: declare WndProfileInformation as a global variable.
And this should be done when you create the window, like in:
code:
WndProfileInformation = MsgPlus.CreateWnd("thing.xml", "WndProfileInformation");
The difference here is the missing "var" prefix, without it it'll get declared as a global variable.
Note: when the window is destroyed, you should delete the variable too!
Personally I would not recommend declaring variables like that. It is bad practice and prone to errors/bugs if you're not carefull.
Always use var and always declare your global variables outside functions first.
I think he was referring to removing the
var from the statement inside the function so instead of creating a local variable, it would set the
already existing global variable.