• 0

    posted a message on Refreshing LibUIDropDownMenu Options

    My AddOn's option menu is currently based on the LibUIDropDownMenu but alas, having implemented the menu, I've come to find out that it cannot be refreshed. This is important because one of the menu's options presents a checkbox for each bag the player has installed.  The problem is that the bags change: some are replaced, some are added to an empy slot, some are removed and placed in a bank slot, etc. The only way to refresh the menu (and therefore reflect such a change) is to reload the UI - which works just fine.


    1) Is my understanding of LibUIDropDownMenu incorrect and it can, in fact, be refreshed?

    2) What other solutions should I be looking at?


    Thanks, in advance


    Posted in: AddOn HELP!
  • 0

    posted a message on Lua Error Interpretation:


    I have a very simple piece of code the raises an error I am unable to understand. Perhaps someone with a more extensive understanding of Lua can clue me in as to what I'm missing. Here is the method declaration in question:


    -- returns the slot in which the bag resides

    function Bag:bagSlot()

         return self.bagSlot        -- this is an integer value representing the slot into which a bag is installed



    Now, here's the method's invocation


    local b = Bag( bagSlot ) 

    local n = b:bagSlot())   -- this is line 23


    Which fails and raises the following error message (I'm using Swatter)


    Message: ..\AddOns\Sandbox\UnitTests\BagTests.lua line 23:
    attempt to call method 'bagSlot' (a number value)


     I'm sure I'm missing something obvious. Thanks, in advance

    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.