Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (139 - 141 of 3856)

Ticket Resolution Summary Owner Reporter
#3791 Fixed Sort arrow not showing in _ArrayDisplay() Jpm pixelsearch
Description

Bug described in this link : https://www.autoitscript.com/forum/topic/204379-sort-arrow-in-_arraydisplay/

========================== Test reproducing the issue :

    #include <Array.au3>
    Global $aSortTest[2][3] = [["1a", "1b", "1c"], ["2a", "2b", "2c"]]
    _ArrayDisplay($aSortTest)

Clicking on a column header doesn't show the sort arrow for either ascending or descending order.

========================== Cause : Line 563 in ArrayDisplayInternals.au3 (version 3.3.14.5) sends a wrong message, because it uses a handle instead of a control id

Local $hHeader = HWnd(GUICtrlSendMsg($hWnd, 0x101F, 0, 0))

========================== How to fix this (lines 558 to 563)

/ Actual wrong code :

Func ArrayDisplay_RegisterSortCallBack($hWnd, $vCompareType = 2, $bArrows = True, $sSort_Callback = "ArrayDisplay_SortCallBack")

#Au3Stripper_Ignore_Funcs=$sSort_Callback

If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)

;~ Local Const $LVM_GETHEADER = (0x1000 + 31) ; 0x101F

Local $hHeader = HWnd(GUICtrlSendMsg($hWnd, 0x101F, 0, 0))

/ Suggested correct code :

Func ArrayDisplay_RegisterSortCallBack($ControlID, $vCompareType = 2, $bArrows = True, $sSort_Callback = "ArrayDisplay_SortCallBack")

#Au3Stripper_Ignore_Funcs=$sSort_Callback

;~ Local Const $LVM_GETHEADER = (0x1000 + 31) ; 0x101F

Local $hHeader = HWnd(GUICtrlSendMsg($ControlID, 0x101F, 0, 0))

Local $hWnd = GUICtrlGetHandle($ControlID)

#3790 Fixed CharW() >= 64968 compares with "" as True Jon Chimp
Description

CharW() >= 64968 compares with "" as True. I think it shouldn't Here a snippet to show the problem.

For $i = 64960 To 64975
        ConsoleWrite('chrw(' & $i & ') = "" ? --> ' & (ChrW($i) = '') & @TAB & @error & @CRLF)
Next

it results as: chrw(64960) = "" ? --> False 0 chrw(64961) = "" ? --> False 0 chrw(64962) = "" ? --> False 0 chrw(64963) = "" ? --> False 0 chrw(64964) = "" ? --> False 0 chrw(64965) = "" ? --> False 0 chrw(64966) = "" ? --> False 0 chrw(64967) = "" ? --> False 0 chrw(64968) = "" ? --> True 0 chrw(64969) = "" ? --> True 0 chrw(64970) = "" ? --> True 0 chrw(64971) = "" ? --> True 0 chrw(64972) = "" ? --> True 0 chrw(64973) = "" ? --> True 0 chrw(64974) = "" ? --> True 0 chrw(64975) = "" ? --> True 0

P.S. (a workaround) As answered in the post at the following link in the forum, the problem doesn't arise if we compare using == instead of = https://www.autoitscript.com/forum/topic/204398-why-charw-64967-compares-as-an-empty-string/?do=findComment&comment=1468690

#3789 Fixed Fileread() returns empty string when variable > 2GB Jon Exit
Description

2GB is the maximum variable size in Autoit. If this size is reached with Fileread() due to UTF8 2 byte processing, then @extended shows 1073741823 read bytes, but the resulting string is empty. I think Fileread() should show @error > 0 . Here a reproducer:

; proof 2GB Variable fileread Error

#AutoIt3Wrapper_UseX64=y
#include <String.au3>
$sTestDir = @TempDir & "\~Test~\"
DirCreate($sTestDir)
FileDelete($sTestDir & "*.txt")
ShellExecute($sTestDir)

OnAutoItExitRegister(_Exit)
Func _Exit()
	ToolTip("")
	MsgBox(64 + 262144, Default, "Check SciTE output to verify Fileread() error." & @LF & @LF & "Then press OK to exit.", 0)
	DirRemove($sTestDir, 1)
	Sleep(500)
	WinClose("[TITLE:" & StringLeft($sTestDir, 3) & "; CLASS:CabinetWClass]")
EndFunc   ;==>_Exit

$iLength = 1024 * 1024 * 1024    ;  1 Gigabyte
$s1GB = _StringRepeat("-", $iLength)
$iLength -= 3

For $i = 1 To 2
	ToolTip("Writing Record #" & $i & ". This takes a while. Stay tuned.")
	Beep(1000, 100)
	$iLength += 1
	$hFileHandle = FileOpen($sTestDir & $i & ".txt", 2)
	$sInitData = StringLeft($i & $s1GB, $iLength)
	FileWrite($hFileHandle, $sInitData)
	FileSetPos($hFileHandle, 0, 0)
	$sReadData = FileRead($hFileHandle)
	ConsoleWrite(@LF & "Fileread $i:" & $i & " Error: " & @error & " Extended: " & @extended & @LF & "    Datalen: " & StringLen($sInitData) & @LF & "ReadDatalen: " & StringLen($sReadData) & @LF & "ReadData(first 10 Bytes): >" & StringLeft($sReadData, 10) & "< " & @LF & "Stringcompare Result: " & (StringCompare($sInitData, $sReadData, 1) ? "NOT" : "") & " equal" & @LF & @LF)
	ToolTip("")
	If StringCompare($sReadData, $sInitData, 1) Then Exit MsgBox(16 + 262144, Default, "Compare Error. I=" & $i, 0)
	FileClose($hFileHandle)
Next

and here the resulting SciTE output:

Fileread $i:1 Error: 0 Extended: 1073741822
    Datalen: 1073741822
ReadDatalen: 1073741822
ReadData(first 10 Bytes): >1---------< 
Stringcompare Result:  equal


Fileread $i:2 Error: 0 Extended: 1073741823
    Datalen: 1073741823
ReadDatalen: 0
ReadData(first 10 Bytes): >< 
Stringcompare Result: NOT equal
Note: See TracQuery for help on using queries.