Modify

Opened 13 years ago

Closed 13 years ago

#2088 closed Bug (Fixed)

_ArrayDisplay not handling Default parameters correctly

Reported by: Xenobiologist Owned by: trancexx
Milestone: 3.3.9.0 Component: Standard UDFs
Version: 3.3.8.0 Severity: None
Keywords: _ArrayDisplay Cc:

Description (last modified by trancexx)

Parameter being Default keyword is treated as literal string and is displayed in that manner.
Default keyword should trigger default behavior, meaning default value of the parameter should be loaded in that case.

#include <Array.au3>

Local $aArray[3] = [100, 200, 300]
_ArrayDisplay($aArray, Default, Default, Default, Default, Default, Default)

The original forum discussion: http://www.autoitscript.com/forum/topic/136100-modify-arraydisplay/

Attachments (0)

Change History (8)

comment:1 Changed 13 years ago by Xenobiologist

Besides, I'm not sure if my code is the best way to achieve the modification.
Fell free, to change the code. All I want is to show what I think needs to be changed.

comment:2 follow-up: Changed 13 years ago by anonymous

The only concern if too many columns will force to display more than the screen width
Except this behavior I agree with the column heading
Anonymous =Jpm

In fact the forcing of limited number of colum by definition of $sheader is a better fonctionality than deplaying a very big number of column.

So the fix can be just to accept Default keyword and a description of $sheader impact

Last edited 13 years ago by Jpm (previous) (diff)

comment:3 in reply to: ↑ 2 ; follow-up: Changed 13 years ago by BrewManNH

Replying to anonymous:

The only concern if too many columns will force to display more than the screen width
Except this behavior I agree with the column heading
Anonymous =Jpm

In fact the forcing of limited number of colum by definition of $sheader is a better fonctionality than deplaying a very big number of column.

So the fix can be just to accept Default keyword and a description of $sheader impact

_ArrayDisplay should never create a GUI larger than the width of the screen, in fact, it usually creates an undersized GUI compared to the ListView inside of it. In the _Array.au3 file, in which I modified a number of the array functions, one of the functions I modified was the _ArrayDisplay function so that it would autosize the GUI and the column widths because the current implementation of _ArrayDisplay doesn't do this currently. Even in my modification, the GUI will be at least 100 pixels smaller than the desktop on all sides regardless of screen resolution.

Look in Example Scripts or in Feature Requests in Trac for a link to the _Array.au3 UDF I'm referring to.

comment:4 Changed 13 years ago by trancexx

Could someone briefly explain what the bug is?

Xenobiologist please read the guidelines for posting here. I'm very tempted to close this ticket as (any form of) rejected because somehow you have successfully managed to do everything wrong.

comment:5 in reply to: ↑ 3 Changed 13 years ago by Jpm

Replying to BrewManNH:

_ArrayDisplay should never create a GUI larger than the width of the screen, in fact, it usually creates an undersized GUI compared to the ListView inside of it. In the _Array.au3 file, in which I modified a number of the array functions, one of the functions I modified was the _ArrayDisplay function so that it would autosize the GUI and the column widths because the current implementation of _ArrayDisplay doesn't do this currently. Even in my modification, the GUI will be at least 100 pixels smaller than the desktop on all sides regardless of screen resolution.

Look in Example Scripts or in Feature Requests in Trac for a link to the _Array.au3 UDF I'm referring to.

Thanks
In fact I really think "default" keyword passing need to be corrected.

But mananing the number of displayed columns by the $sheader is a real functionality. no header is displaying the total number of column so no bug for me.

comment:6 Changed 13 years ago by anonymous

Okay, I'm fine with your decision. So, if someone has an array with e.g. 10 columns, but he defines only 4 columns in the header parameter, he we'll only see those 4 columns displayed by _ArrayDisplay. FMPOV, this is a risk, because the function is a "debugging function" which should show as much information as possible (the complete array at all times).
Anyhow, I accept that = no problem here.

@trancexx: The only thing left now is, that the function doesn't deal correctly with the "Default" word as parameter which is briefly explained in the thread which I provided a link to in my first post. Nevertheless, I'll read the guidelines again a next time my ticket will be more correct.

comment:7 Changed 13 years ago by trancexx

  • Description modified (diff)
  • Summary changed from Modify _ArrayDisplay to _ArrayDisplay not handling Default parameters correctly

comment:8 Changed 13 years ago by trancexx

  • Milestone set to 3.3.9.0
  • Owner set to trancexx
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6664] in version: 3.3.9.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 trancexx.
Author


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

 
Note: See TracTickets for help on using tickets.