Modify

Opened 12 years ago

Closed 12 years ago

#2839 closed Bug (Fixed)

GUISetAccelerators - accelerators 1D Array - AutoIt HardCrash

Reported by: mLipok Owned by: Jon
Milestone: 3.3.13.18 Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: Cc:

Description

Here is repro script:

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

Example()

Func Example()
	GUICreate("Custom MsgBox", 225, 80)

	GUICtrlCreateLabel("Please select a button.", 10, 10)
	Local $idYes = GUICtrlCreateButton("Yes", 10, 50, 65, 25)
	Local $idNo = GUICtrlCreateButton("No", 80, 50, 65, 25)
	Local $idExit = GUICtrlCreateButton("Exit", 150, 50, 65, 25)

	; Set GUIAccelerators for the button controlIDs, these being Ctrl + y and Ctrl + n

	; Below Original line from HelpFile
	; Local $aAccelKeys[2][2] = [["^y", $idYes], ["^n", $idNo]]

	; Below my modified line
	Local $aAccelKeys[2] = ["^y", $idYes]

	; HereIs HardCrash
	GUISetAccelerators($aAccelKeys)

	GUISetState(@SW_SHOW) ; Display the GUI.

	While 1
		Switch GUIGetMsg()
			Case $GUI_EVENT_CLOSE
				MsgBox($MB_SYSTEMMODAL, "You selected", "Close")
				ExitLoop

			Case $idYes
				MsgBox($MB_SYSTEMMODAL, "You selected", "Yes") ; Displays if the button was selected or the hotkey combination Ctrl + y was pressed.

			Case $idNo
				MsgBox($MB_SYSTEMMODAL, "You selected", "No") ; Displays if the button was selected or the hotkey combination Ctrl + n was pressed.

			Case $idExit
				MsgBox($MB_SYSTEMMODAL, "You selected", "Exit")
				ExitLoop

		EndSwitch
	WEnd
	GUIDelete() ; Delete the GUI.
EndFunc   ;==>Example

tested on Relase and Beta version

Attachments (0)

Change History (3)

comment:1 by Melba23, 12 years ago

Owner: set to Jon
Status: newassigned

Confirmed.

M23

comment:2 by J-Paul Mesnage, 12 years ago

Version: 3.3.13.163.3.12.0

not a regression same in 3.3.12.0

comment:3 by Jon, 12 years ago

Milestone: 3.3.13.18
Resolution: Fixed
Status: assignedclosed

Fixed by revision [10937] in version: 3.3.13.18

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


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