Opened 14 years ago

Closed 14 years ago

#1449 closed Bug (Fixed)

GUICtrlDelete(), GUICtrlCreateDummy()

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: GUICtrlDelete GUICtrlCreateDummy Cc:


Not sure If GUICtrlDelete() should delete a GUICtrlCreateDummy() created control. If not, its at leased documented this way.

;; AutoIt(
;; Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 3  CPU:X86 OS:X86)
#cs - local output.
	GUICtrlCreateDummy = 3
	GUICtrlDelete = 0
	GUICtrlCreateDummy = 4
	GUICtrlDelete = 0
Global $iResult
$iResult = GUICtrlCreateDummy()
ConsoleWrite('GUICtrlCreateDummy = ' & $iResult & @CRLF)
$iResult = GUICtrlDelete($iResult)
ConsoleWrite('GUICtrlDelete = ' & $iResult & @CRLF)
$iResult = GUICtrlCreateDummy()
ConsoleWrite('GUICtrlCreateDummy = ' & $iResult & @CRLF)
$iResult = GUICtrlDelete($iResult)
ConsoleWrite('GUICtrlDelete = ' & $iResult & @CRLF)

Attachments (0)

Change History (4)

comment:1 Changed 14 years ago by Valik

I consider this a bug. The following script demonstrates that the dummy control is not deleted. I cannot think of any valid reason why the delete request should be ignored:

Opt("GUIOnEventMode", 1)
GUISetState(@SW_SHOW)	; Required
Local $idDummy = GUICtrlCreateDummy()
GUICtrlSetOnEvent($idDummy, "OnDummy")
GUICtrlSendToDummy($idDummy)	; Test the event works.
GUICtrlDelete($idDummy)	; Delete the control.
GUICtrlSendToDummy($idDummy)	; The event SHOULD NOT fire but it does.

Func OnDummy()
	MsgBox(4096, "", "Called")
EndFunc	; OnDummy()

comment:2 Changed 14 years ago by Jon

Found this comment in the source code:

	return 0;            // Can't delete these yet

Not sure why...

comment:3 Changed 14 years ago by Jon

Can't see any reason this code needed to be there. Maybe it was supposed to be "break" rather than "return". Removing and marking as fixed.

comment:4 Changed 14 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5663] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.