Opened 18 years ago
Closed 18 years ago
#93 closed Bug (Fixed)
ControlTreeView() - sets @error=1 even if command works OK
| Reported by: | Zedna | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.2.11.2 | Component: | AutoIt |
| Version: | 3.2.10.0 | Severity: | |
| Keywords: | Cc: |
Description
Touched commands: Check, Select, Expand
Checking/Selecting/Expanding is done in treeview but @error is set to 1 though.
Note: Exists command works OK and doesn't set @error to 1
Here is test script:
No messageboxes should appear but for Check, Select, Expand commands they appear with value=1 (@error)
#include <GUIConstants.au3>
$gui = GUICreate("ControlTreeview test", 212, 212)
$treeview = GUICtrlCreateTreeView(6, 6, 200, 160, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_CHECKBOXES), $WS_EX_CLIENTEDGE)
$h_tree = ControlGetHandle($gui, "", $treeview)
$root = GUICtrlCreateTreeViewItem("Root", $treeview)
$item1 = GUICtrlCreateTreeViewItem("Item 1", $root)
$item2 = GUICtrlCreateTreeViewItem("Item 2", $root)
$item3 = GUICtrlCreateTreeViewItem("Item 3", $root)
$item4 = GUICtrlCreateTreeViewItem("Item 4", $root)
$item41 = GUICtrlCreateTreeViewItem("Item 41", $item4)
$item42 = GUICtrlCreateTreeViewItem("Item 42", $item4)
$item5 = GUICtrlCreateTreeViewItem("Item 5", $root)
GUISetState(@SW_SHOW)
ControlTreeView ($gui, "", $h_tree, "Expand", "Root")
$ret = ControlTreeView ($gui, "", $h_tree, "Exists", "Root|Item 4")
If @error Then MsgBox(0,"Exists",@error) ; here it is OK
;~ MsgBox(0,"Exists return",$ret) ; here it is OK
ControlTreeView ($gui, "", $h_tree, "Check", "Root|Item 4")
If @error Then MsgBox(0,"Check",@error) ; here should be @error = 0 but it is 1
ControlTreeView ($gui, "", $h_tree, "Select", "Root|Item 4")
If @error Then MsgBox(0,"Select",@error) ; here should be @error = 0 but it is 1
ControlTreeView ($gui, "", $h_tree, "Expand", "Root|Item 4")
If @error Then MsgBox(0,"Expand",@error) ; here should be @error = 0 but it is 1
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
Note: This script could be used in AutoIt helpfile as example script for ControlTreeView() - there is no example script
Attachments (0)
Change History (7)
comment:1 by , 18 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 18 years ago
| Milestone: | → 3.2.11.1 |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
comment:4 by , 18 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
Now in version 3.2.11.1 Check, Select, Expand commands are OK but problem is with Exists command - return 1 and also sets @error to 1.
comment:7 by , 18 years ago
| Milestone: | 3.2.11.1 → 3.2.11.2 |
|---|---|
| Resolution: | → fixed |
| Status: | reopened → closed |
Fixed in version: 3.2.11.2

Thanks,
example added too