Opened 11 years ago

Closed 11 years ago

#2340 closed Bug (Completed)

_GUICtrlListView_SimpleSort changes sort parameter variable value

Reported by: BrewManNH Owned by: guinness
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


In reference to this thread, I noticed that the function, _GUICtrlListView_SimpleSort, is changing the value of the variable passed to the function after it's done with sorting the listview.

What this does is it arbitrarily changes a value that a user passes it in their script, without telling them that it does so, and for no discernible reason, that I can see. It's inverting the value of the $vDescending variable, which is passed ByRef, from true to false or from false to true, after it has sorted the listview and recreated it. This, in my opinion, shouldn't be happening, because it can cause issues with code that uses this sort especially since it's not mentioned anywhere that it's doing this.

This section of code should be removed unless someone can explain why it's necessary, or why it's good practice.

If (IsArray($vDescending)) Then
	$vDescending[$iCol] = Not $b_desc
	$vDescending = Not $b_desc

Attachments (0)

Change History (1)

comment:1 Changed 11 years ago by guinness

  • Milestone set to
  • Owner set to guinness
  • Resolution set to Completed
  • Status changed from new to closed

Added by revision [7935] 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 guinness.

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

Note: See TracTickets for help on using tickets.