• 0

    posted a message on Can't get SexyCooldown to work for my shammy spells
    Did you install the latest alpha version, or the release version?
    Because there has not been a new release version since April and it wont work very well, if at all. The latest alpha versions have some fixes for 4.0 so try that out.
    Posted in: AddOn HELP!
  • 0

    posted a message on Problems with getting a vertical status bar to update on resize.
    I an not completely sure, but I think you will have to temporary set the value of the bar to 0 in your ChangeHeight() function.

    Because I think the status bar works the way that if you send in the same value as it already have it wont do any updates to the position of the bar. But once you den kill a mob you send in a new value that is different then the current one and it then updates.

    This could be all wrong but I have had the exact same problem that you are describing, but I can't remember if that was the solution since it was some time ago.

    At work myself so I cannot test it, but hope it helps.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Question about AceGUI
    Looking at the code of the EditBox widget, it does not actually have any callback for OnEscapePressed. So the only way that I can see is to manually set the script on the editbox like you did there.
    Posted in: AddOn HELP!
  • 0

    posted a message on Question about AceGUI
    Try with this instead:
     itembox:SetCallback("OnEscapePressed", function(widget) widget.editbox:ClearFocus() end)


    The AceGUI-EditBox widget itself does not have a ClearFocus method, but the editbox does.
    Posted in: AddOn HELP!
  • 0

    posted a message on Question about AceConfig-3.0 Options Tables
    I think the get function needs to return a string for it to set the text.

    Try changing the get function to:
    get = function(info) 
       return tostring(math.abs(db.profile.gold))
    end
    Posted in: Lua Code Discussion
  • 0

    posted a message on mRunes - Rune Frame replacement
    mRunes

    A simple addon to replace the default Rune Frame and some more.

    Download from Curse
    Project Page

    Features
    • Module based, each module can be turned on/off individually.
    • Runes
      • Individual small bars that go from empty to full as the cooldown of the rune ends.
      • Optional numeric cooldown on each rune.
    • Runic Power
      • Runic power shown on a movable bar.
      • Current runic power shown as number.
    Configuration
    • Change colors of each type of rune (Blood, Unholy, Frost and Death)
    • Change the width and height of the runes.
    • Change the spacing in between them.
    • Change the texture.
    • Set the position for the collection of runes.
    • Set In- and Out-of-Combat alpha of the runes + one extra setting for out of combat but with runes on cooldown and the same for when runic power is not 0.
    • And more...
    Posted in: General AddOns
  • 0

    posted a message on Getting current difficulty
    I am using this for finding out if it is heroic or normal for any type of instance.
    Then use maxPlayers to see if its 10 or 25man.

    _, _, difficultyIndex, _, maxPlayers, dynamicHeroic, isDynamic = GetInstanceInfo()
    	
    -- If its a dynamic instance then the dynamicHeroic variable can be used 1 = heroic, 0 = normal
    if isDynamic then
    	if dynamicHeroic == 1 then
    		return true
    	else
    		return false
    	end
    end
    	
    -- If inside party dungeon
    if maxPlayers == 5 and difficultyIndex == 2 then
    	return true
    
    -- If dificultyindex is above 2 and in a raid instance
    elseif difficultyIndex > 2 then
    	return true
    end
    	
    return false
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Deleting frames with Scripts set to them
    Alright, that explains it then.
    Need to do some modifications to re-use then ;)

    Thanks!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Deleting frames with Scripts set to them
    I just thought if you delete the reference to something so it is unreachable the garbage collector handles that and deletes it eventually.

    But I guess frames are different and WoW itself still have references to them?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Deleting frames with Scripts set to them
    So I have a question about deleting frames that have scripts attatched to them,

    for i in ipairs(buttons) do
       buttons[i] = nil
       buttons[i] = CreateFrame("Button")
       -- do some settings to the button
      
       buttons[i]:SetScript("OnEnter", function()
          -- do stuff
       end)
       buttons[i]:SetScript("OnLeave", function()
          -- do stuff
       end)
    end


    Unless I do
    buttons[i]:SetScript("OnEnter", nil)
    buttons[i]:SetScript("OnLeave", nil)


    before running the code that creates the buttons again I seem to get a memory leak losing the memory allocated by the script functions each time. Even after garbagecollect.

    So the question is if I am supposed to nil the scripts before deleting the frames, or if I am doing something else wrong.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.