Page MenuHomeFeedback Tracker

[Feature request] Sort Control Table Commands
Need More Info, NormalPublic

Description

Similar to the other list controls (CT_LISTBOX, CT_LISTNBOX, CT_COMBO), CT_CONTROLS_TABLE could need some sorting command. It already supports setting values via ctSetData and ctSetValue. ctSort could maybe use the data, since the entries have no text themselves.

ListboxControlsTable (new)
lbSortctSort
lbSortByValuectSortByValue

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Feature Request

Event Timeline

7erra created this task.Dec 27 2020, 2:36 PM
R3vo added a subscriber: R3vo.Dec 27 2020, 2:58 PM
dedmen claimed this task.Jan 4 2021, 3:09 PM
dedmen changed the task status from New to Need More Info.
dedmen added a subscriber: dedmen.

Can you add a screenshot of how a ControlsTable looks like? No idea what that is.
How do you sort combo? is there a cbSort or does lbSort also work on combo?
Can you add a script to create a simple ControlsTable, with example usage of the (to be added) sort command?

7erra added a comment.Jan 4 2021, 4:24 PM

Can you add a screenshot of how a ControlsTable looks like? No idea what that is.

I have attached an example mission which replicates the example image from the BIKI (https://community.bistudio.com/wiki/CT_CONTROLS_TABLE).

How do you sort combo? is there a cbSort or does lbSort also work on combo?

lbSort does work on CT_COMBO.

Can you add a script to create a simple ControlsTable, with example usage of the (to be added) sort command?

Controls table rely heavily on their config, so they are not really scriptable and there is the base class in the main config is not usable. I have added some example usage to the attached mission.

When sorting the controls table it might be necessary to sort only a range of indices, since the user can insert headers in between. So something like this:

_ctrl ctSort [[LIST OF INDICES], AscendingOrDescending];

Or in accordance to the weird syntax that lbSort uses:

ctSort [_ctrl , [LIST OF INDICES], "ASC/DESC"];

And same for ctSortByValue

R3vo removed a subscriber: R3vo.Jul 21 2021, 6:11 PM
dedmen removed dedmen as the assignee of this task.Jul 26 2021, 1:57 PM