- changed title to Window.Title direct assignment not working in callback. (Deleted Issue #58, problem was this issue.)
Window.Title direct assignment not working. (Deleted Issue #58, problem was this issue.)
Issue #73
closed
Code throws unhandled exception.
MyGui := Gui()
MyGui.Add("Text", "w400 h10")
MyBtn := MyGui.Add("Button", , "Change Title")
MyBtn.OnEvent("Click", "TrashTitle")
MyGui.Show()
TrashTitle()
{
MyGui.Title := "My New Title"
}
Working AHK code:
MyGui := Gui()
MyGui.Add("Text", "w400 h10")
MyBtn := MyGui.Add("Button", , "Change Title")
MyBtn.OnEvent("Click", TrashTitle)
MyGui.Show()
TrashTitle(*)
{
MyGui.Title := "My New Title"
}
Comments (7)
-
reporter -
reporter - changed title to Window.Title direct assignment not working. (Deleted Issue #58, problem was this issue.)
-
reporter This code, when run, does not show the GUI.
MyGui := Gui() MyGui.Add("Text", "w400 h10") MyBtn := MyGui.Add("Button", , "Change Title") MyGui.Title := "This should work" ;MyBtn.OnEvent("Click", TrashTitle) MyGui.Show()
It does run correctly, however, in AHK v2.0-beta.7.
-
repo owner Gui.Title had a getter, but I had forgotten to add a setter. Please test again.
-
reporter Working following latest commits. Marking as resolved and closing.
-
reporter - changed status to resolved
Resolved
-
reporter - changed status to closed
Closed.
- Log in to comment