Modify

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 J-Paul Mesnage, 18 years ago

Owner: set to J-Paul Mesnage
Status: newassigned

comment:2 by J-Paul Mesnage, 18 years ago

Milestone: 3.2.11.1
Resolution: fixed
Status: assignedclosed

Thanks,
example added too

comment:3 by J-Paul Mesnage, 18 years ago

Fixed in version: 3.2.11.1

comment:4 by Zedna, 18 years ago

Resolution: fixed
Status: closedreopened

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:5 by Zedna, 18 years ago

EDIT: now tested on WIN98SE.

comment:6 by Zedna, 18 years ago

Note: I didn't tested another commands.

comment:7 by J-Paul Mesnage, 18 years ago

Milestone: 3.2.11.13.2.11.2
Resolution: fixed
Status: reopenedclosed

Fixed in version: 3.2.11.2

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.