And oddly, when encapsulating the value in an array or object prop/value pair, no error is thrown, but the value is still not assigned.
Code: Select all
test := Gui.New("+0x200000")
test.onEvent("close","gui_close")
ctl := test.Add("Radio","vMyRadio","test radio")
ctl.value := {value:1} ; no error - doesn't set value
ctl.value := {1:1} ; no error - doesn't set value
ctl.value := [1] ; no error - doesn't set value
ctl.value := 1 ; error - doesn't set value
ctl := test.Add("Text","vMyText","text start test")
ctl.text := "test done" ; value set as expected
test.Show("w300 h300")
gui_close(*) {
ExitApp
}
Of course, for a Radio control, I wouldn't expect that an array or obj prop/value pair would do anything, just odd that it didn't throw an error, but ctl.value := 1 did.
Looked for a change in the docs... didn't see anything different for Radio.
Error Message:
Code: Select all
---------------------------
__test_v2.ahk
---------------------------
Error: Invalid value.
Specifically: 1
Line#
017: test := Gui.New("+0x200000")
018: test.onEvent("close","gui_close")
020: ctl := test.Add("Radio","vMyRadio","test radio")
---> 024: ctl.value := 1
027: ctl := test.Add("Text","vMyText","text start test")
028: ctl.value := "test done"
042: test.Show("w300 h300")
046: {
047: ExitApp()
048: }
049: Exit
Try to continue anyway?
---------------------------
Yes No
---------------------------