Modify

#3707 closed Bug (Fixed)

GUISetOnEvent with empty func name does not disables the event

Reported by: MrCreatoR <mrgeorge.sandler@…> Owned by: Jos
Milestone: 3.3.15.1 Component: AutoIt
Version: 3.3.14.5 Severity: None
Keywords: Cc:

Description

Remarks for GUISetOnEvent / GUICtrlSetOnEvent in docs sais:

If the function is an empty string "" the previous user-defined is disabled.

But it's not working. The same for GUICtrlSetOnEvent.
Reproducing example:

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

Opt("GUIOnEventMode", 1)

GUICreate("Parent1")
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_CLOSE, "")

GUISetState(@SW_SHOW)

While 1
	Sleep(10)
WEnd

Func SpecialEvents()
	Select
		Case @GUI_CtrlId = $GUI_EVENT_CLOSE
			MsgBox($MB_SYSTEMMODAL, "Close Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle)
			GUIDelete()
			Exit
	EndSelect
EndFunc

Attachments (0)

Change History (2)

comment:1 by Jos, on Mar 23, 2019 at 9:52:52 PM

Milestone: 3.3.15.1
Owner: set to Jos
Resolution: Fixed
Status: newclosed

Fixed by revision [12206] in version: 3.3.15.1

comment:2 by Jos, on Mar 23, 2019 at 9:54:48 PM

Was similar to ticket for Ctrl's #3689... same fix applied.

Modify Ticket

Action
as closed The owner will remain Jos.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.