View Single Post
03-19-09, 09:23 PM   #5
eliljey
A Deviate Faerie Dragon
Join Date: Feb 2009
Posts: 14
So I got out rev 1 of my addon a while back and discovered a problem just recently with the pulldown menus. It took a pretty specific situation to make it show up and now I'm stumped as to how to fix it.

The menus themselves work great. They have predefined lists (not dynamic) and they set the variables they control accordingly. The problem is that if the settings they change are done outside of the addon it doesn't know and even if I had code to check the setting I can't figure out how to change the menu accordingly.

More specifically, one of my pulldown menus sets the loot threshold. The menu is built of the standard WoW list (uncommon, rare, epic, legendary). When I form a group/raid and open the addon it defaults to uncommon. That's ok, the loot threshold always does when you start a group.

But! If someone else started the group and changed the loot settings then passed me leader the addon doesn't reflect those settings. (Oversight on my part when doing the design.) So I wrote a function that checks for those settings "OnShow" in order to update the menus based on the current setting. However, I can't find any way, in any of the material listed above or anywhere else, to change the pulldown menu selection outside of actually using the pulldown menu. I thought it was treated as just a button so Button:SetText("blah") but it didn't work.

This problem would also occur if the menu was a saved variable. I can get the setting I want, I just don't know how to update the menus current selection to reflect it.

Any ideas?
  Reply With Quote