Modify

Opened 14 years ago

Closed 14 years ago

#1833 closed Bug (Fixed)

_arraydisplay : elements longer than 4094 bytes are like empty elements

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

Description

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] = ""
_arraydisplay($A)
#cs
Col 0 is the length of  col 1 element
but with one-dimensional array hapens the same,
Col 0 is hopefuly helpful at display
#ce

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 14 years ago by mvg

GUICtrlCreateListViewItem() limitation side effect.

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

A quick (possibly too quick) look at http://msdn.microsoft.com/en-us/library/bb774760%28v=VS.85%29.aspx 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 14 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 14 years ago by Jpm

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

Fixed by revision [5963] in version: 3.3.7.0

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.