Opened 10 years ago

Closed 10 years ago

#1833 closed Bug (Fixed)

_arraydisplay : elements longer than 4094 bytes are like empty elements

Reported by: 436602556274@… Owned by: Jpm
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


array elements longer than 4094 bytes displayed like empty strings. Even other long elements don't fit on screen, are only truncated, but elements > 4094 look like empty elements. See ListView of code below:

#include <array.au3>
Dim $A [6][2]	; Array of strings, col 0 is only for documentation
; col 1 is the string
dim $s_long = "XXXXXXXXXX" ; build a very long string
$s_long = StringReplace($s_long,"X","XXXXXXXXXX") ;  100 bytes
$s_long = stringreplace($s_long,"X","XXXXXXXXXX") ;1,000 -,,-
$s_long = StringReplace($s_long,"X","XXXXX")	  ;5,000 -,,- long
$A[1][0] = 4093
$A[1][1] =stringleft($s_long,$A[1][0])
$A[2][0] = 4094
$A[2][1] =stringleft($s_long,$A[2][0])
$A[3][0] = 4095
$A[3][1] =stringleft($s_long,$A[3][0])
$A[4][0] = 4096
$A[4][1] =stringleft($s_long,$A[4][0])
$A[5][0] = 0
$A[5][1] = ""
Col 0 is the length of  col 1 element
but with one-dimensional array hapens the same,
Col 0 is hopefuly helpful at display

In case of one-dimensional array you can't see any difference between empty and long elements. During test of RegExp gave me fatal information.
I'm not sure if this is bug or documentation request so feel free to change this status. I think it's more bug then any limitation and/or documentation problem.

Attachments (0)

Change History (4)

comment:1 follow-up: Changed 10 years ago by mvg

GUICtrlCreateListViewItem() limitation side effect.

comment:2 in reply to: ↑ 1 Changed 10 years ago by anonymous

A quick (possibly too quick) look at at pszText parameter descripion tells me (again I can be mis-interprating this in such a rush) that only the first 260 TCHARs of text subitem are displayed.

If that is real, then there is no point in _not_ truncating array elements to 260 characters, well before 4095. I agree that the function should display that first 260 chars instead of "", which can be utterly misleading to the user.

I apologize for any mistake in understanding that MSDN prose.

comment:3 Changed 10 years ago by Jpm

In fact the builtins GUICtrlCreateListViewItem(),GUICtrlCreateListView() and GUICtrlSetData() for List, Combo, ListView and ListViewItem reject lthe creation/update if the item length is greater than 4094.
I will document this limit. But for _ArrayDisplay() which is more a debug Udf I will troncate the item

comment:4 Changed 10 years ago by Jpm

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

Fixed by revision [5963] in version:

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

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.