EditGetLine fails if current line is empty.
Issue #70
closed
Test script:
MyGui := Gui()
CZ_Edit1 := MyGui.Add("Edit", "x10 y10 w160 h100", "Edit controls tests")
CZ_LbBtn16 := MyGui.Add("Button", "w120 x10 y+10 h25", "Edit Line Text")
CZ_LbBtn16.OnEvent("Click", "GetLineText")
MyGui.Show()
GetLineText() {
CurrentLine := EditGetCurrentLine(CZ_Edit1, MyGui)
Try
{
CurrentLineText := EditGetLine(CurrentLine, CZ_Edit1, MyGui)
MsgBox(CurrentLineText, "Current Line Text")
}
catch as e ; Handles the first error thrown by the block above.
{
MsgBox("An error was thrown!`nSpecifically: " e.Message)
Exit
}
}
steps to reproduce
- Run script.
- Move to empty line in Edit.
- Click button.
Comments (3)
-
repo owner -
reporter - changed status to resolved
Resolved, thank you!
-
reporter - changed status to closed
Closed.
- Log in to comment
I’ve committed a fix, please test.