Modify ↓
Opened on Jan 8, 2008 at 4:02:30 PM
Closed on Jan 8, 2008 at 4:12:35 PM
Last modified on Jan 7, 2009 at 1:30:24 AM
#12 closed Bug (Rejected)
GuiCtrlSetData() not appending a single value if it already exists
| Reported by: | Bowmore | Owned by: | Jpm |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.10.0 | Severity: | |
| Keywords: | XP Home SP2 fully patched | Cc: |
Description
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
Wend
Attachments (0)
Change History (3)
comment:1 by , on Jan 8, 2008 at 4:11:32 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , on Jan 8, 2008 at 4:12:35 PM
| Resolution: | → rejected |
|---|---|
| Status: | assigned → closed |
comment:3 by , on Jan 10, 2008 at 5:02:23 PM
| Milestone: | 3.2.12.0 |
|---|
Note:
See TracTickets
for help on using tickets.

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