Jump to content
aiter

bug report _DebugArrayDisplay

Recommended Posts

aiter
Posted (edited)

I noticed that _DebugArrayDisplay has a bug when copying data and headings

I  copiaibug2.PNG.408cfddb2bf58aa3b5583d75fd8695f4.PNGaibug1.PNG.7da10a44c33904ece5c3306248992687.PNGed the

 

The column alignment is out - copying just the data seems to have no issues

 

Edited by aiter
add

Share this post


Link to post
Share on other sites
aiter
Posted (edited)

I figured out what the bug is:-

The row heading (first column) does not a tab delimiter so it offsets everything off by 1

The data does have the tab delimter

If I make argument 4 (I had the value as 64 to omit row heading) zero, the bug is gone.

Edited by aiter
additional

Share this post


Link to post
Share on other sites
Melba23

aiter,

Your explanation is as clear as mud. Please provide 2 small reproducer scripts, one of which shows the problem and the other which shows the solution you found.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
aiter
Posted (edited)

Apologies Melba for my confused explanation.  Here is my test script

#include <Debug.au3>
dim $aArr[5][100]
for $x = 0 to 4
    for $y = 0 to 99
        $aArr[$x][$y] = $x & $y
    Next
next
$head = ""
for $x = 1 to 99
    $head &= "h" & $x & chr(9)
next
$head &= "h100"
 Opt("GUIDataSeparatorChar", chr(9))
_DebugArrayDisplay($aArr,"test",Default,64,Default,$head,Default)  ; no row heading displayed  - Mark 1
_DebugArrayDisplay($aArr,"test",Default,0,Default,$head,Default)   ; row heading displayed     - Mark 2

When the array display pops up I click 'Copy data & hdr row" and paste it into excel.

From the paste from the first array popup, row is displayed on the excel spread sheet - it should not be.  It displays like this

Row|h1
Row 0
Row 1
Row 2
Row 3
Row 4

It should not be showing 'Row' in the first column, but match what is shown in the popup.

PS - Big thumbs up for array allowing sorting by clicking on the column header :)

Edited by aiter

Share this post


Link to post
Share on other sites
Melba23
Posted (edited)

aiter,

I now see what you mean and I am investigating.

M23

Edit:

Got it - the "|" in the header line is hardcoded when we should be using the $sCurr_Separator variable. It will be fixed in the next release.

And you get the header/row data because you select the "Copy Data & Hdr/Row" button - so the header and row information is added automatically regardless of whether it is displayed in the dialog. If all you want is the data, then use the "Copy Data Only" button. If you want the data and the header with no row numbers than you will have to write a custom function and use the "Run User Func" button - we cannot cater for every possibility!

Edit 2: All done. If you want to fix it in your current installation then amend line #517 in ArrayDisplayInternals.au3 to read:

$sItem = "Row" & $sCurr_Separator & $sItem

 

Edited by Melba23
  • Thanks 2

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×