CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Copy from AceDB to another AceDB?
    Thanks!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Convert subversion project to Git ?
    Thanks Torhal! :)
    Posted in: Project Discussion
  • 0

    posted a message on Copy from AceDB to another AceDB?
    So I managed to pinpoint entires one by one

    DB.profile["MainWindow"] = copyTable(Recount.db.profile["MainWindow"])
    DB.profile["MainWindowMode"] = copyTable(Recount.db.profile["MainWindowMode"])


    But am not very happy with the result, its cumbersome and ugly IMHO

    Halp ? :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Convert subversion project to Git ?
    Is this possible, without any loss in history ?

    If not, is there a guide to do the conversion ?

    Thanks in advance,
    Fulgerul
    Posted in: Project Discussion
  • 0

    posted a message on Copy from AceDB to another AceDB?
    I want to save Recounts current profile, so that I can load it at a later time.

    Doing this will not work:
    DB = RPSdb
    DB.profile = copyTable(Recount.db.profile)


    This code
    DB = RPSdb
    DB.profile[1] = copyTable(Recount.db.profile)

    will put an ugly
    [B]{}, -- [1][/B]
    ["GraphWindowY"] = 0,
    ["MainWindow"] = {
    ["AutoHide"] = false,
    
    ...


    Which I dare not feed Recount with.

    So do you have any ideas ?

    Thanks in advance,
    Fulgerul

    PS. I tried Recount.db:SetProfile(name) but this pops up the configuration window and does not save [the position for eg.] properly as far as I can see. DS.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetNumMacroIcons() missing
    Has anyone bothered to extract the whole icon database prepatch ?

    Im finding the icons IDs have changed as well as the API mentioned by OP.

    So for example Ability_Stealth was id 490 before, now it is 574! :(
    Posted in: Need Help?
  • 0

    posted a message on Basic question but uncrackable
    Corrected, i am comparing type and id, and if both are false i wish to clear that spot.
    Posted in: Need Help?
  • 0

    posted a message on Basic question but uncrackable
    Hi,
    What I wanted to achieve is this:
    I have an ActionBar addon that switches profiles. This in itself is a slow process since everything must be sent to the server.

    So i wanted to adopt a change saying "if this spell/companion or item is already on the bar, do not clear the spot to readd the very same spell".

    This is illustrated here:
            --Load Action bar profile!
    	for index, keys in pairs(PABdb.profile) do
    			
    		-- Clear current spot
    			ClearCursor()
    			PickupAction(index)
                            ClearCursor()
    


    PABdb.profile contains the following:
    {
    	"spell", -- [1]
    	56222, -- [2]
    	1, -- [3]
    }, -- [1]
    


    So my initial thought was basicly
    if currentActionbarItemType ~= savedActionbarItemType and currentActionbarItemID ~= savedActionbarItemID then
         PlaceAction(index) --Put it back
    end
    



    After releasing 3 addons, i still feel like a newb at lua, so I am sorry for any confusion caused and THANK YOU FOR YOUR TIME AND INPUT! :)

    PS. If you want to see the code live, check out http://wow.curseforge.com/addons/profiles-action-bars/ DS.
    Posted in: Need Help?
  • 0

    posted a message on Basic question but uncrackable
    local a1 = "spell"
    local a2 = "spell"
    local a3 = 49143
    local a4 = 49203
    
    if a1 ~= a2 then print "hej" end
    
    if a3 ~= a4 then print "heja" end
    
    if a1 ~= a2 and a3 ~= a4 then print "Oh noes!" end


    Print 'heja' as it should, but not 'Oh noes!'

    This should be basic, but feels like I am doing something terribly wrong...

    Thanks in advance for your help as allways!
    Posted in: Need Help?
  • 0

    posted a message on Curse.com + Curseforge - Limit the visible files ?
    Ok thanks for the answer. I will manually delete so i have 2 releases (as per your suggestion) and one Beta up :)
    Posted in: Need Help?
  • 0

    posted a message on Curse.com + Curseforge - Limit the visible files ?
    Hey guys and gals,
    My addon page on curse.com displays 5 downloadable files by default, i would like to make it *3*

    (or if possible, 1 beta and 1 release!).

    Is this possible ?
    Posted in: Need Help?
  • 0

    posted a message on Function reference ?
    Thank you Adirelle, this was what I was looking for. :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Function reference ?
    Quote from egingell
    That only works if the first argument to DeleteProfil() is either a throw away variable or the frame (e.g. function DeleteProfil(self, arg)).

    Otherwise you must call it using the dot not the colon (i.e. addon_obj.del_profile_ref(arg)).

    As to what your actual problem is, you need to be more specific and paste all of your code.


    Wanted to keep this post short and sweet so it didn't become TLDR ;)


    Anyways, what I want to achieve is to be able to have a "header" file that I copy to my other addons without having to specify the objectname everytime.

    I am aware of objects but have not come that far into lua yet that I feel comfortable with them.

    I tried all possible combinations based on your advice but could not advance in the matter. Would you please care to write in cleartext what needs to be coded ?

    Core.lua
    http://www.curseforge.com/media/files/540/626/ProfilesMacros-r27.zip

    Module
    http://pastebin.com/x3yTeZvi

    Thank you for your patience :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Function reference ?
    local addon_obj = MPS
    local del_profile_ref = "DeleteProfil"
    
    ... -- Later in the code
    
    elseif (cmd=="delete" and arg~="")then
        addon_obj:del_profile_ref(arg) -- This should now translate to MPS:DeleteProfil(arg)
    


    I know AceEvent successfully uses this technique but that code is far to highlevel for me. Can anyone help ?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Registering for a custom event?
    Quote from pigmonkey
    I believe you are looking for:

    function ABS:WOWLUA(event, name)
            print ("ABS: MPS loaded!!")
            print (name)
    end
    
    ABS:RegisterMessage("Profiles_Macros_loaded", "WOWLUA")
    


    The registration doesn't need to know about the arguments about to be passed. What you pass to SendMessage will be recieved in the registered callback.


    Yepp thats the one, thanks a bunch! :)
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.