View Single Post
07-23-13, 04:22 PM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Phanx View Post
Postal does not use UIDropDownMenu_GetSelected or UIDropDownMenu_SetSelected, but if you are using those functions in your addon, then you are already "rebuilding the whole dropdown".



The menu in Postal does not use AceGUI or any other libraries. In fact, the thread Seerah linked is a tutorial written by the author of Postal showing you how to use the UIDropDownMenu system the way Postal does -- without any libraries.



You'd need to keep a table containing each menu option and its check state. When the user checks or unchecks one entry, update its value in the table to reflect its new state, and then loop over the table to update your "lolvar" variable.

However, concatenating values into a string seems like a really inefficient way to store multiple values. You should just store them in the table, and use the table values, instead of squishing them into a string.
So i pretty much need to use the info.checked and write my own iterator functions, thats what i was meant by rebuilding it and wanted to skip.

I would like to work with tables too, but i cant, the lolvar is a savedvar too, and it's size based on the number of the player's avaliable stances.
  Reply With Quote