Modify

Opened 12 years ago

Closed 12 years ago

#2138 closed Bug (Fixed)

GuiCtrlRead with GUICtrlSendToDummy

Reported by: stroket@… Owned by: Valik
Milestone: 3.3.9.1 Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Dummy GUICtrlSendToDummy GUI Cc: stroket@…

Description

GuiCtrlRead(Dummy Ctrl-ID Set By GUICtrlSendToDummy) returns a deformed version of the string used in GUICtrlSendToDummy.

#include <GUIConstants.au3>

local $sTest = "Test String Variable"
local $GUI = GuiCreate("Bug", 128, 64), $MSG
local $BTN = GuiCtrlCreateButton($sTest, 0, 0, 128, 64)
local $DUM = GuiCtrlCreateDummy()
GuiSetState()
while 1
	$MSG = GuiGetMsg()
	switch $MSG
		case $GUI_EVENT_CLOSE
			exit
		case $BTN ; Press the button multiple times
			GUICtrlSendToDummy($DUM, String($sTest)) ; Only seems to happen with variables that are strings.
			; Doesn't seem to cause the bug by just using $sTest, but directly putting in a string
			; (or using the string function) will cause the string to become sexualized.
			; GuiCtrlRead is what actually causes the problem.
		case $DUM
			$sTest = GuiCtrlRead($DUM)
			GuiCtrlSetData($BTN, $sTest) ; Rename the button.
			ConsoleWrite($sTest & @CRLF)
	endswitch
wend

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by Valik

Actually the call to String() is unnecessary. Adding that call means you only have to click the button twice instead of 3 times.

Anyway, this is actually a crash under the debugger. Not sure what's causing it at the moment, though.

comment:2 Changed 12 years ago by Valik

Never mind, I found the bug. Stupid stupid stupid stupid stupid code.

I'll fix it later.

comment:3 Changed 12 years ago by Valik

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

Fixed by revision [6815] in version: 3.3.9.1

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

Action
as closed The owner will remain Valik.
Author


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

 
Note: See TracTickets for help on using tickets.