Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#12 closed Bug (Rejected)

GuiCtrlSetData() not appending a single value if it already exists

Reported by: Bowmore Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity:
Keywords: XP Home SP2 fully patched Cc:


This script demonstrates a bug in repeated calls
to GUICtrlSetData() to add a single value to a list
where that value already exists in the list. The value
is not appended to the list unless there is a pipe character
after the value.

#include <GUIConstants.au3>

GUICreate("My GUI")  ; will create a dialog box that when displayed is centered

$mylist1 = GUICtrlCreatelist ("", 10,10)
GUICtrlSetData($mylist1, "test")
GUICtrlSetData($mylist1, "test")
; only one entry apeers in list

$mylist2 = GUICtrlCreatelist ("", 10,200)
GUICtrlSetData($mylist2, "test")
GUICtrlSetData($mylist2, "test|")
; two entries apeer in list

GUISetState ()       ; will display an empty dialog box with a  control with focus on

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Attachments (0)

Change History (3)

comment:1 Changed 17 years ago by Jpm

  • Owner set to Jpm
  • Status changed from new to assigned

comment:2 Changed 17 years ago by Jpm

  • Resolution set to rejected
  • Status changed from assigned to closed

No bug the say
If the "data" starts with GUIDataSeparatorChar or is an empty string "" the previous list is destroyed.

comment:3 Changed 17 years ago by Jon

  • Milestone deleted

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 Jpm.

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

Note: See TracTickets for help on using tickets.