I am writing a script that that takes elements from a document and for each element makes a custom object with its own properties and methods. This list of elements is then spat out into a ScriptsUI listbox.
How do I link each listbox item to its associated obejct? i.e. So if I double click on a listbox item it will run a particular method within that object.
P.S. I dont want to have to store array ids in a column or something hacky like that.