Modify

Opened 11 years ago

Closed 11 years ago

#93 closed Bug (Fixed)

ControlTreeView() - sets @error=1 even if command works OK

Reported by: Zedna Owned by: Jpm
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 Changed 11 years ago by Jpm

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

comment:2 Changed 11 years ago by Jpm

  • Milestone set to 3.2.11.1
  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks,
example added too

comment:3 Changed 11 years ago by Jpm

Fixed in version: 3.2.11.1

comment:4 Changed 11 years ago by Zedna

  • Resolution fixed deleted
  • Status changed from closed to 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:5 Changed 11 years ago by Zedna

EDIT: now tested on WIN98SE.

comment:6 Changed 11 years ago by Zedna

Note: I didn't tested another commands.

comment:7 Changed 11 years ago by Jpm

  • Milestone changed from 3.2.11.1 to 3.2.11.2
  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in version: 3.2.11.2

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


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

 
Note: See TracTickets for help on using tickets.