Modify

Opened 16 years ago

Closed 16 years ago

#1542 closed Bug (Fixed)

Debug.au3, Debug window mode, Ignores possible OnEventMode state.

Reported by: anonymous Owned by: J-Paul Mesnage
Milestone: 3.3.7.0 Component: Standard UDFs
Version: 3.3.6.0 Severity: None
Keywords: _Debug Cc:

Description

Seems its missing a "Opt('GUIOnEventMode', 0)" prior to using "GUIGetMsg()" in function "Debug_ReportWindowWaitClose()".

Side effect: script will not close normally. (debug keeping it open because its not/never getting the $GUI_EVENT_CLOSE event from the debug window.)

Attachments (0)

Change History (7)

comment:1 by anonymous, 16 years ago

perhaps?, seems to work ok.

Func __Debug_ReportWindowWaitClose()
	Local $nOld = Opt("WinDetectHiddenText", True)
	Local $hWndReportWindow = WinGetHandle($__gsReportWindowTitle_Debug, $__gsReportWindowText_Debug)
	Opt("WinDetectHiddenText", $nOld)

	$nOld = Opt('GUIOnEventMode', 0) ;; [MOD]
	Local Const $GUI_EVENT_CLOSE = -3
	While WinExists(HWnd($hWndReportWindow))
		If GUIGetMsg() = $GUI_EVENT_CLOSE Then GUIDelete($hWndReportWindow)
	WEnd
	Opt("GUIOnEventMode", $nOld) ;; [MOD]

	$__ghReportWindowEdit_Debug = 0
	$__gbReportWindowWaitClose_Debug = True
	$__gbReportWindowClosed_Debug = True
EndFunc   ;==>__Debug_ReportWindowWaitClose

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

Just to confirm your contxt can you put a repro script failing without the propose modification?
Thanks

comment:3 by anonymous, 16 years ago

#AutoIt3Wrapper_Au3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -q

#include <debug.au3>
Global Enum $_DbWin_ = 1, $_DbConsole_, $_DbMsgbox_, $_DbFile_
Global Const $DbErrExt = True
_DebugSetup(Default, False, $_DbWin_, 'DebugOut.log')

Global $Quit = 0
Func _Quit()
    If Not $Quit Then $Quit = -1
EndFunc

Global Const $GUI_EVENT_CLOSE = -3

Opt("GUIOnEventMode", 1)

GUICreate("test")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
GUISetState(@SW_SHOW)

_DebugOut('Open Debug Window.')
Do
	Sleep(100)
Until $Quit
_DebugOut('Wait Loop Terminated.')

(tested on original v3.3.6.0 debug.au3)

comment:4 by J-Paul Mesnage, 16 years ago

Thanks you ;)
I want to be for sure your script were using GUISetOnEvent.
next time don't assume that we can write a repro script.
I will check for possible regression in other case and fix this report

comment:5 by anonymous, 16 years ago

Roger.

next time don't assume that we can write a repro script.

Its a little bit more complicated in my case. But I'll try to keep it in mind.

comment:6 by J-Paul Mesnage, 16 years ago

Thanks again,
In fact looking at your example I found out another error when the use script does not delete the GUI at the end.

comment:7 by J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: changed from Gary to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [5740] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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