Custom Query (3927 matches)
Results (190 - 192 of 3927)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #3848 | Fixed | _GUICtrlListView_GetItemTextArray does not return an error for multi-column listview if no row is selected. | ||
| Description |
I had written a function
In my modifications ( #include <GuiListView.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> $gui = GUICreate('Test') $lv = GuiCtrlCreateListView('a|b|c', 10, 10, 350, 250) For $i = 1 To 30 GUICtrlCreateListViewItem(StringFormat('%d|%d|%d', $i-1, Random(1,10,1), Random(1,10,1)), $lv) Next $hLV = GUICtrlGetHandle($lv) _GUICtrlListView_SetExtendedListViewStyle($hLV, BitOR($LVS_EX_FULLROWSELECT,$WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES)) _GUICtrlListView_SetColumnWidth($hLV, 0, 85) _GUICtrlListView_SetColumnWidth($hLV, 1, 85) _GUICtrlListView_SetColumnWidth($hLV, 2, $LVSCW_AUTOSIZE_USEHEADER) $bt1 = GUICtrlCreateButton('Set selected to 3', 10, 280, 120, 24) $bt2 = GUICtrlCreateButton('Set 5 to selected', 140, 280, 120, 24) $btRemove = GUICtrlCreateButton('Remove Selection', 270, 280, 120, 24) $cb = GUICtrlCreateCheckbox(' Use functions with Index check!', 10, 320) $bCheck = False GUISetState() $f = _GUICtrlListView_GetItemTextArray $fCheck = _GUICtrlListView_GetItemTextArray_MOD While True $bCheck = BitAND(GUICtrlRead($cb), $GUI_CHECKED) ? True : False Switch GUIGetMsg() Case -3 Exit Case $bt1 If _GUICtrlListView_SetItemTextArray($hLV, ($bCheck ? $fCheck($hLV) : $f($hLV)), 3) <> 1 Then _ MsgBox(0, 'Error', 'None Selection') Case $bt2 If _GUICtrlListView_SetItemTextArray($hLV, ($bCheck ? $fCheck($hLV, 5) : $f($hLV, 5))) <> 1 Then _ MsgBox(0, 'Error', 'None Selection') Case $btRemove _GUICtrlListView_SetItemSelected($hLV, _GUICtrlListView_GetNextItem($hLV), False, False) EndSwitch WEnd ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost (gafrost) ; Modified.......: @BugFix ; =============================================================================================================================== Func _GUICtrlListView_GetItemTextArray_MOD($hWnd, $iItem = -1) ;~ Local $sItems = _GUICtrlListView_GetItemTextString($hWnd, $iItem) ; Here occurs the error. This function produces a wrong output without @error. ; i.e.: listview with 3 columns, none selection but "$iItem = -1" - should use the current selection ; $sItems = "||", none error! Local $sItems = _GUICtrlListView_GetItemTextString_MOD($hWnd, $iItem) If $sItems = "" Then Local $aItems[1] = [0] Return SetError($LV_ERR, $LV_ERR, $aItems) EndIf Return StringSplit($sItems, Opt('GUIDataSeparatorChar')) EndFunc ;==>_GUICtrlListView_GetItemTextArray ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost (gafrost) ; Modified.......: @BugFix ; =============================================================================================================================== Func _GUICtrlListView_GetItemTextString_MOD($hWnd, $iItem = -1) Local $sRow = "", $sSeparatorChar = Opt('GUIDataSeparatorChar'), $iSelected If $iItem = -1 Then ; '$iItem = -1' says: use the current selection $iSelected = _GUICtrlListView_GetNextItem($hWnd) ; get current row selected ; But this function returns also "-1" if none item is selected Else $iSelected = $iItem ; get row EndIf ; here is required to check if _GUICtrlListView_GetNextItem() has failed If $iSelected < 0 Or $iSelected > _GUICtrlListView_GetItemCount($hWnd) - 1 Then Return SetError(1,0,0) For $x = 0 To _GUICtrlListView_GetColumnCount($hWnd) - 1 ; _GUICtrlListView_GetItemText() it does not matter at all whether a valid index was passed. ; In case of error there is no message and an empty string is returned. This cannot be distinguished from an actually empty item. ; For this reason, a wrong index must be caught before calling the function. $sRow &= _GUICtrlListView_GetItemText($hWnd, $iSelected, $x) & $sSeparatorChar Next Return StringTrimRight($sRow, 1) EndFunc ;==>_GUICtrlListView_GetItemTextString |
|||
| #3242 | No Bug | Buy_Backlinks | ||
| Description |
You need backlinks? Just like this website has, buy www.backlinks.com Buy_Backlinks http://www.shieldselfstorage.ca/ |
|||
| #2335 | Fixed | __WinAPI_EnumWindowsChild() creates results in wrong sequence | ||
| Description |
In the latest beta version, (and going back to at least the 3.3.7.20 version - I did not check previous), the WinAPI.au3 file has an error in the Func __WinAPI_EnumWindowsChild($hWnd, $fVisible = True) $hWnd = _WinAPI_GetWindow($hWnd, $__WINAPICONSTANT_GW_CHILD) While $hWnd <> 0 If (Not $fVisible) Or _WinAPI_IsWindowVisible($hWnd) Then __WinAPI_EnumWindowsChild($hWnd, $fVisible) __WinAPI_EnumWindowsAdd($hWnd) EndIf $hWnd = _WinAPI_GetWindow($hWnd, $__WINAPICONSTANT_GW_HWNDNEXT) WEnd EndFunc ;==>__WinAPI_EnumWindowsChild BUG:
In the body of the function, DESCRIPTION:Currently, on entry to the function, we begin enumerating the child windows of the parent we are coming from. But, instead of adding our first level-1 child window to the output array at this time, we immediately recurse (inside the While Loop) in an attempt to find any of that level-1 window's level-2 children. Our level-1 window does not get added to the output array until the recursed call pops back up -- at which point, that window's level-2 children (and any of their level-n children) have already been added to the output array -- causing our level-1 parent window to be added to the output array after its level-2 children in sequence. I wouldn't care if this was the same sequence used by the core Windows' APIs -- but Windows outputs its enum results in the standard fashion of parent-first, followed by children. Thanks, CBruce |
|||
