• 0

    posted a message on Array In AceDB
    There is your problem, your storing the values as a single string seperated by commas, not as indexes. So your set function is not working correctly or your Get Function is not passing the right values back.

    Really you should rethink what your doing here, creating a new table on each set is classically considered bad form; so it begs the question, what are you trying to do with the config window, we might be able to tell you of a better way :)
    Posted in: Need Help?
  • 0

    posted a message on Array In AceDB
    What does "self.db.profile.GroundMount" look like ? Likely that is your problem

    Nevermind, i know what it's going to look like, an sequenctially indexed table...

    IMO, you need to redesign your config window to be more effective. [[ { strsplit(";", newValue) } ]] this is a bad thing to use often.
    Posted in: Need Help?
  • 0

    posted a message on LibDataBroker Rift Port
    Quote from myrroddin
    @OrionShock: I notice you have UnregisterEvent, will that also work for UnregisterAllEvents?
    eventFrame:UnregisterEvent(Event.Some.Event)
    eventFrame:UnregisterAllEvents()
    If not, it shouldn't be too hard to add that. Just string.match Event.* and table.remove them.

    Also, does this allow
    eventFrame:RegisterEvent("Event.Some.Event", "BobsEvent")
    
    function eventFrame:BobsEvent() end


    Yeah, you need to convert the Event back to using dot notation and then findTable() it, then itterate though and remove the registration in the OnUnused() function. The problem is that lua dosn't like the whole dot notation for events, so you have pass around the events as strings, though you could adjust it to dynamically figure out if it's a string or a table and use accordingly.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibDataBroker Rift Port
    You could replace "MyAddon" in that table with "tostring(addon)", but that has it's own issues. You'd need to declare a standard way of getting the addon name into that part of the function.
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibDataBroker Rift Port
    Quote from Adirelle
    RiftUI events in a nutshell (according to the wiki):
    ...
    The system is made so that all events should declared beforehands. You cannot use an arbitrary event name and you cannot register events that have not been created ; two things you can do with CBH. This requires that the load order should be honored as for variables and functions : if addon B would use an event fired by addon A, addon B should wait for addon A to load before registering its handler.


    That is Ugly way of doing things..

    @myrroddin how bout a Better Event hander for RiftUI ( Granted Untested but should work :)

    local CBH = LibStub("CallbackHandler-1.0")
    local eventFrame = {}
    eventFrame.cbh = CBH:New(eventFrame, "RegisterEvent", "UnregisterEvent", nil)
    local findTable = function(...)
    	local t
    	for i = 1, select("#", ...) do
    		local e = select(i, ...)
    		if i = 1 then t = _G[e] else t = t[e] end
    		if not t then return error("Bad Event Name "..string.join(".", ...) ) end
    	end
    	return t
    end
    	--Due to the way the callback works, the event has to be registered with "_" notation, so our OnUsed
    	--function handles the translation to "." doted notation and back
    function eventFrame.OnUsed(registry, addon, event)
    	local eventTable = findTable(event:gsub("_", "%.") )
    	tinsert(eventTable, { function(...) eventFrame.cbh:Fire(event, ...) end, "MyAddon", "SomeLabel")
    end
    
    eventFrame:RegisterEvent("Some.Event")
    
    function eventFrame:Some_Event(event, ...)
    end


    With a better Event handler like this, you can write the addon like it's in wow, where events don't care that much :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibDataBroker Rift Port
    Quote from myrroddin
    Inefficient how? Is it because of how Rift registers events as tables?


    It's just that it's not a clean and clear way of doing things. IMO (Bias) even if they up and copied the classic Ace2 event handler and used that instead it would be an easier way of handling things. Maybe it was my lack of looking but i didn't find a clear way of registering for an event on the RiftUI wiki..
    Posted in: Lua Code Discussion
  • 0

    posted a message on LibDataBroker Rift Port
    ... So i looked up RiftUI's API and this particular API.

    It is really, really inefficient way of doing things. Im not sure you could transpose LDB over to rift. You might be better off copying CBH over and just using that, it would be easier.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Maintaining/packaging a modular addon
    I do this in SickOfClickingDailies, and it's a rather straight forward thing to setup :)

    Development Directory Structure:
    -MainAddon (Folder)
    --MainAddon.toc (Loaded by WoW)
    --MainModuel.xml (Loaded by MainAddon.toc)
    --core.lua (Loaded by MainModuel.xml)
    --Libs (Loaded by MainModuel.xml)
    --Module1 (Folder)
    ---Module1.toc (Not Used)
    ---Module1.xml (Loaded by MainAddon.toc)
    ---File.lua (Loaded by Module1.xml)
    --Module2 (Folder) 
    ---Module2.toc (Not Used)
    ---Module2.xml (Loaded by MainAddon.toc)
    ---File.lua (Loaded by Module2.xml)


    The MainAddon.toc file loads the MainAddon.xml. Using debug comments for the toc file, then load your module.xml files in order. Each xml file loads their small part of the addon. This allows for development all in one directory as git expects.

    Post Packager Directory Structure::
    -MainAddon (Folder)
    --MainAddon.toc (Loaded by WoW)
    --MainModuel.xml (Loaded by MainAddon.toc)
    --core.lua (Loaded by MainModuel.xml)
    --Libs (Loaded by MainModuel.xml)
    
    -Module1 (Folder)
    ---Module1.toc (Loaded by WoW)
    ---Module1.xml (Loaded by Module1.toc)
    ---File.lua (Loaded by Module1.xml)
    
    -Module2 (Folder) 
    ---Module2.toc (Loaded by WoW)
    ---Module2.xml (Loaded by Module2.toc)
    ---File.lua (Loaded by Module2.xml)
    


    When the packager works the addon over, the comments in the toc file happen and the MainAddon.toc no longer load the module xml files, but still loads the "MainAddon.xml" file & so your addon core loads normally w/ all it's libs in place. Then each of the toc files in the modules then take care of loading their respective Module.xml file.

    Checkout how Ace3 is packaged for another example.
    Posted in: AddOn HELP!
  • 0

    posted a message on Changing texture color in OnUpdate handler
    Psudo code dosn't really help....

    if you can post the project name or if you want to post the whole code at http://www.wowace.com/paste/ we could be more helpful
    Posted in: AddOn HELP!
  • 0

    posted a message on XML help
    the only problem i see is that your OnClick handler is wrong.
    Other than that, XML errors don't generally show up in game but from the log file out of game.
    So the code posted & the error message don't have anything to do with each other
    Posted in: Need Help?
  • 0

    posted a message on SickOfClickingDailies
    That is an odd behavior for it to go back to using the 6.6 naming after tagging. I don't know why it did that.
    Posted in: General AddOns
  • 0

    posted a message on SickOfClickingDailies
    Quote from Tr909Tom
    Todays Update

    Date: 2011-08-11 19:07:29
    ID: 1
    Error occured in: Global
    Count: 1
    Message: ..\AddOns\SickOfClickingDailies\ldb.lua line 27:
    Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon 'SickOfClickingDailies' already exists.
    Debug:
    [C]: ?
    [C]: ?
    ...ns\TradeskillInfo\libs\AceAddon-3.0\AceAddon-3.0.lua:140: NewAddon()
    SickOfClickingDailies\ldb.lua:27: in main chunk


    Could you post the first error please. :)
    Posted in: General AddOns
  • 0

    posted a message on Archy and fan fixes
    I'd Recommend you contact the author for further insight..

    You have a few options.
    1) Become a projecet maintainer
    2) Take over the project
    3) Fork it and make a new one

    As wowace/Curse dosn't allow "fan updates" this creates some problems.
    Posted in: AddOn HELP!
  • 0

    posted a message on Original idea for once - Dungeon + Raid History tracker!
    Addons can fake numbers of this sort....

    Likely the most reliable thing you could sort out is the Achievement / Statistics counts that you can get though inspections...

    ElitestGroup used to do this, then it broke iirc
    Posted in: Addon Ideas
  • 0

    posted a message on Daily To-Do's
    Quote from ianseddon55
    I already do, as far as I know.


    Yeah, I tried doing support like this in SickOfClickingDailies, found that it was just too much to constantly keep updating it for every patch. Than and AceConfig started to cry when an option table hit 240 elements. Eventually i just recoded it to handel dailies automatically and with auto-detect aspects.

    Just a fair warning, your options table/s can get rather convoluted quickly as the number of quests sorted goes up :)
    Posted in: General AddOns
  • To post a comment, please or register a new account.