Custom Query (3921 matches)
Results (364 - 366 of 3921)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #3620 | Completed | _ArraySort on 2D is not stable but the documentation says it is | ||
| Description |
_ArraySort claims to be stable in its in-script documentation if you look at the "modified" header. LazyCoder - added $iSubItem option; Tylo - implemented stable QuickSort algo; Jos - changed logic to correctly Sort arrays with mixed Values and Strings; Melba23 - implemented stable pivot algo If you want to sort 2D arrays then the help file tells you that only quick- or insert-sort is used on these (a closer look on the Array.au3 shows you that only quicksort is used). But if you sort with this code for example you will see that the array tells you that [5, Cherry] comes before [3, Cherry] where it should be the other way round since this algorithm is supposed to be stable. Stable algorithms do not change the order of items if they equal the compared value. If you look at the __ArrayQuickSort2D inside of the Array.au3 you will see that elements are swapped if $L is less or equal than $R. (l. 1813 commented with ; Swap on 3.3.14.2) First the array is sorted on its first column showing that [3, Cherry] comes before [5, Cherry] and then you can see that after sorting the second column they are switched. Code to reproduce: #include <Array.au3> Local $aTestArray[5][2] = [[5, "Cherry"], [4, "Banana"], [3, "Cherry"], [2, "Orange"], [1, "Apple"]] ;Sort the whole array ascending on the first column _ArraySort($aTestArray, 0, 0, 0, 0) _ArrayDisplay($aTestArray) ;Sort the whole array descending on the second column _ArraySort($aTestArray, 0, 0, 0, 1) _ArrayDisplay($aTestArray) This also happens on the 3.3.14.5. |
|||
| #3619 | Fixed | Return value of _WinAPI_LocalFree() is not consistent with what the documentation says | ||
| Description |
Return Value according to the documentation Success: True Failure: False, call _WinAPI_GetLastError() to ... In WinAPIMem.au3 Func _WinAPI_LocalFree($hMemory)
Local $aResult = DllCall("kernel32.dll", "handle", "LocalFree", "handle", $hMemory)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0]
EndFunc ;==>_WinAPI_LocalFree
If the error is caused by the DllCall(), the documentation is correct. However, the return value of LocalFree() itself according to MSDN is:
Thus, if LocalFree() returns 0 (which means successful), _WinAPI_LocalFree() returns False (which means failed). |
|||
| #3618 | Fixed | x86 or x64 for $tagNMTVKEYDOWN pb align | ||
| Description |
when processing $TVN_KEYDOWN notification the structure $tagNMTVKEYDOWN does not properly set vKey under x64. When changing $tagNMTVKEYDOWN definition, it is ok for both architecture, but Flags has an incorrect value on x86 architetcure. As the documentatio state that it is always 0, it should not be a problem, but I wasn't able to find how to fix it. So change tagNMTVKEYDOWN from Global Const $tagNMTVKEYDOWN = "align 1;" & $tagNMHDR & ";word VKey;uint Flags" to Global Const $tagNMTVKEYDOWN = $tagNMHDR & ";word VKey;uint Flags" For example to reproduce see https://www.autoitscript.com/forum/topic/192326-an-event-for-treeview-checkbox-check/ It feels like equivalent to https://www.autoitscript.com/trac/autoit/ticket/1510 or https://www.autoitscript.com/trac/autoit/ticket/1479 or https://www.autoitscript.com/trac/autoit/ticket/1130 |
|||
