Page MenuHomeFeedback Tracker

Data paramater for lbSetData command should accept object, number, and array etc
New, WishlistPublic

Description

lbSetData [idc, index, data];

The data parameter has to be a string ATM. Obviously this majorly limits which data types can be stored and attached to any given lb index / selection.

For example, if I'm filling a listbox with a list of nearby static objects, I don't have the option to store their positions with lbSetData

Details

Legacy ID
1359076282
Severity
None
Resolution
Open
Reproducibility
Always
Category
Feature Request
Additional Information

Something like the following would be nice

{
_displayName = getText ( configFile >> "cfgVehicles" >> _x >> "displayName" );
_index = lbAdd [ 1500, _displayname ];
lbSetData [1500, _index, getPos _x ];// STORE THE POSITION
} forEach allMissionObjects "Land_TableDesk_F";

OR

{
_displayName = getText ( configFile >> "cfgVehicles" >> _x >> "displayName" );
_index = lbAdd [ 1500, _displayname ];
lbSetData [1500, _index, _x ]; // STORE THE OBJECT ITSELF
} forEach allMissionObjects "Land_TableDesk_F";

Event Timeline

Iceman77 edited Steps To Reproduce. (Show Details)Oct 26 2014, 2:30 AM
Iceman77 edited Additional Information. (Show Details)
Iceman77 set Category to Feature Request.
Iceman77 set Reproducibility to Always.
Iceman77 set Severity to None.
Iceman77 set Resolution to Open.
Iceman77 set Legacy ID to 1359076282.May 7 2016, 7:41 PM

Being able to store data types other then a string in a data field for GUI's would be a very nice change in the engine. Right now when using objects in it, it can become rather tricky to work-around string limitation.

+1