Opened 13 years ago

Last modified 12 years ago

#1861 closed Bug

_ArrayDisplay: Bug when data contains separator and $sHeader is used — at Initial Version

Reported by: Thomas Rupp <thomas.rupp@…> Owned by: Gary
Milestone: 3.3.9.5 Component: Standard UDFs
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

If the table to display contains the default GUIDataSeparatorChar ("|") and you use $sHeader the resulting display is wrong.

Example:
#include <array.au3>
Global $aTestArray1[1] = Test|Row 1?
_ArrayDisplay($aTestArray1, "Test Array 1", -1, 0, "", "|", "Rows|Column0")

should result in:
Rows Column0
[0] Test|Row 1

but you get:
Rows|Column0
[0]
[0]

Suggested solution:

Replace (starting with line 362):
; Set header up
If $sHeader = "" Then

$sHeader = "Row " ; blanks added to adjust column size for big number of rows
For $i = 0 To $iSubMax

$sHeader &= $sSeparator & "Col " & $i

Next

EndIf

with:
; Set header up
If $sHeader = "" Then

$sHeader = "Row " ; blanks added to adjust column size for big number of rows
For $i = 0 To $iSubMax

$sHeader &= $sSeparator & "Col " & $i

Next

ElseIf $sDataSeparatorChar <> $sSeparator Then

$sHeader = StringReplace($sHeader, $sDataSeparatorChar, $sSeparator)

EndIf

Change History (0)

Note: See TracTickets for help on using tickets.