ComboBox.Focused - attempt to retrieve from Hotkey hangs Keysharp, forcing manual kill

Issue #64 closed
Winter Laite created an issue

ISSUE

Attempted AHK code after reading bug report (code below). After porting to Keysharp, code freezes Keysharp, necessitating a manual kill of the Keysharp process.

ahk code
main := gui()
cbCtrl := main.add("combobox", "w200", ["one","two","three","four"])
main.show()
return

F1::
{
    if !cbCtrl.focused
        msgbox "not focused"
    else
        msgbox "focused"
}

This code fails in AHK, but only because the ‘focused’ property is apparently never true. It simply always reports ‘not focused’.

keysharp test code
!#F1::
{
    if (!cbCtrl.Focused) {
        MsgBox("Not focused")
    }
    else {
        MsgBox("Focused")
    }
}

!Esc::ExitApp()



Main := Gui(, "CB Focus Test")
cbCtrl := Main.Add("ComboBox", "w200", ["one","two","three","four"])
Main.Show()

Hitting the hotkey causes Keysharp to freeze.

Lexikos had a comment on this bug in AHK, which may or may not be relevant to Keysharp:

If so, it would probably be because the "child" Edit control has focus (and would be a bug).

Comments (4)

  1. Log in to comment