Modify

#3791 closed Bug (Fixed)

Sort arrow not showing in _ArrayDisplay()

Reported by: pixelsearch Owned by: Jpm
Milestone: 3.3.15.4 Component: Standard UDFs
Version: 3.3.14.5 Severity: None
Keywords: Cc:

Description (last modified by Jpm)

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)

Attachments (0)

Change History (3)

comment:1 Changed 20 months ago by pixelsearch

The part "Test reproducing the issue" did paste poorly.
It can be found on the forum (link at the top of the report)
Thanks

comment:2 Changed 20 months ago by Jpm

  • Description modified (diff)

fix original description badly formatted

comment:3 Changed 20 months ago by Jpm

  • Milestone set to 3.3.15.4
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12445] in version: 3.3.15.4

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.