• 0

    posted a message on Profile management
    thx for the answers and the function
    works awesome !
    Posted in: AddOn HELP!
  • 0

    posted a message on Profile management
    Hi there,
    I'm currently trying to implement a profile management in my addon. Saving and deleting profiles work fine. But everytime I load a profile any changes made to the addon also changes the saved data in the profile. It seems as if the settings of the addon and the settings of the profile are bind to each other after a loading. After a /reload ui the "binding" isn't there anymore and any changes to the addon don't effect the saved data in the profiles.

    Thats the function I use to load a profile

    vexalarm_spells are the current settings of the addon
    vexalarm_spellprofiles are the the settings saved to a profile, they are saved as: vexalarm_spellprofiles[profilename]

    function vexalarm_profile_load(key, slashcmd)
    	if key == nil then key = vexalarm_spellprofiles_profile_load end
    	if key ~= "" then
    		if vexalarm_spellprofiles[key] == nil then print("|CFFFF7D0AVex Alarm|r - Error: Spell-Profile not found")
    		else
    			vexalarm_spells = vexalarm_spellprofiles[key]
    			if slashcmd then print("|CFFFF7D0AVex Alarm|r - Profile '"..key.."' loaded") end
    		end
    	end
    	vexalarm_spellprofiles_profile_load = ""
    end
    


    argument key is the name of the profile, because of another function the function sometimes doesn't get the profilename as an argument and has therefore load the profilename from a variable (works).
    I think, that the problem is
    vexalarm_spells = vexalarm_spellprofiles[key]

    It seems like it doesnt copy the content of the profile in the table vexalarm_spells, but insteads binds both tables.
    I allready tried
    local temp = vexalarm_spellprofiles[key]
    vexalarm_spells = temp 
    

    instead, to avoid a direct link, but the problem persists.

    I hope you can help me out.
    Ty, fuda
    Posted in: AddOn HELP!
  • 0

    posted a message on listing table in AceConfig
    thx again, rewrote a few parts (but mostly because of design reasons, not because of bugged code) and I love it, thank you very much
    Posted in: Ace3
  • 0

    posted a message on listing table in AceConfig
    hi,
    sry that I needed 1 week to reply.
    Thank you for your help and I'm sry I used another tablename. I just didnt want to post all the code and tried to simplify the problem by parsing only the code i thought was needed by you. I'll try your code and if errors occur I'll post my exact code.
    Ty
    Posted in: Ace3
  • 0

    posted a message on AceConfig validate problem
    yeah its that bug,
    ty
    Posted in: Ace3
  • 0

    posted a message on AceConfig validate problem
    Hi,
    I'm currently using this code:
    marker_new = {
    	name = "Place a new 'marker' at the following location:",
    	desc = "Enter a place where to put the new mark",
    	order=55, type = "input", multiline = false, width = "double",
    	validate = function (info, val)
    		if markercheck(val) then return true
    		else return "ERROR - "..val.." is not a valid position" end
    		end,
    	set = function(info,val) addmarker(val) initialize(true) end,
    	get = function() return "" end,
    	},


    Everything works good except for the error message of the validate function. Whenever I input an invalid text in the field and press the "okay" button, nothing happens, allthough I thought somewhere somehow the error message should be printed?
    Can someone tell me where I went wrong ?
    Ty
    Posted in: Ace3
  • 0

    posted a message on UNIT_POWER event triggered rarely
    found a post about the problem:
    http://wowprogramming.com/forums/development/424
    the events are only triggered that seldom, WoW however manages to predict the energy between these event-triggers having the bars fill fluently
    Posted in: AddOn HELP!
  • 0

    posted a message on UNIT_POWER event triggered rarely
    Hi,
    I'm currently building myself an alterantive energybar.
    Everything works quite good, even the animation I implemented, except for the events. Everytime I dump the complete energy of my druid and let me show the gained energy, it looks quite harsh, because it is updated so seldom.

    I have the following events registered:
    			self:RegisterEvent("PLAYER_LOGIN")
    			self:RegisterEvent("PLAYER_ENTER_COMBAT")
    			self:RegisterEvent("PLAYER_LEAVE_COMBAT")
    			self:RegisterEvent("COMBAT_LOG_UNFILTERED")
    			self:RegisterEvent("UNIT_POWER")
    			self:RegisterEvent("UNIT_DISPLAYPOWER")
    			self:RegisterEvent("UNIT_MAXPOWER")


    Everytime one of these events is triggered I let the eventHandler do this:

    changenumber = changenumber +1
    print("change "..changenumber)

    So it just prints me out everytime an event is triggered.

    I experienced that during the ~10s it takes for my druid to regenerate the 100 energy, the events trigger only 4-5 times.
    So instead of a fluent filled energybar, it looks like I gain ~25 energy every 2s ...

    Anyone here knows how to "fix" that?

    I allready tried it with an animation to cover that, but you can still recognize this effect :/
    Posted in: AddOn HELP!
  • 0

    posted a message on optionpanels placed alphabetical?
    yay

    	cdalarm_optionpanel = cdalarm.AceConfigDialog:AddToBlizOptions("CD Alarm", "CD Alarm")
    	cdalarm_optionpanel_msgs = cdalarm.AceConfigDialog:AddToBlizOptions("Messages", "Messages", "CD Alarm")
    	cdalarm_optionpanel_frame = cdalarm.AceConfigDialog:AddToBlizOptions("Frame Design", "Frame Design", "CD Alarm")
    	cdalarm_optionpanel_sounds = cdalarm.AceConfigDialog:AddToBlizOptions("Sounds", "Sounds", "CD Alarm")
    	cdalarm_optionpanel_show = cdalarm.AceConfigDialog:AddToBlizOptions("Show", "Show", "CD Alarm")


    that works, I had to name the parent instead of linking to him :D
    Posted in: AddOn HELP!
  • 0

    posted a message on optionpanels placed alphabetical?
    I just found out, that there's something wrong with the parent I choose and I'm trying some other tags out :D

    Posted in: AddOn HELP!
  • 0

    posted a message on optionpanels placed alphabetical?


    As you can see my addon "CD Alarm" lists the subcategories of the addon between other addons.
    All of them a build with AceConfig

    i've got the panels as functions, for example the panel for "show"

    function cdalarm.panel_show()
    	return {
    		type = "group",
    		args = {				
    			infight = {
    				name = "Show only when infight",
    				order=10, type = "toggle", width="double",
    				desc = "Only show the frame, when infight",
    				set = function(self,key) cdalarm_showonlyinfight=key cdalarm_checkforinfight(key) end,
    				get = function() return cdalarm_showonlyinfight end,
    				},
    			}
    		}
    end


    this function is used here:

    cdalarm.panel = {}
    	cdalarm.panel.main = cdalarm.panel_main()
    	cdalarm.panel.msgs = cdalarm.panel_msgs()
    	cdalarm.panel.frame = cdalarm.panel_field()
    	cdalarm.panel.colors = cdalarm.panel_colors()
    	cdalarm.panel.sounds = cdalarm.panel_sounds()
    	cdalarm.panel.show = cdalarm.panel_show()
    	
    	cdalarm.optionpanel = cdalarm.AceConfigDialog:AddToBlizOptions("CD Alarm", "CD Alarm")
    	cdalarm.optionpanel_msgs = cdalarm.AceConfigDialog:AddToBlizOptions("Messages", "Messages", cdalarm.optionpanel)
    	cdalarm.optionpanel_frame = cdalarm.AceConfigDialog:AddToBlizOptions("Frame Design", "Frame Design", cdalarm.optionpanel)
    	cdalarm.optionpanel_colors = cdalarm.AceConfigDialog:AddToBlizOptions("Colors", "Colors", cdalarm.optionpanel)
    	cdalarm.optionpanel_sounds = cdalarm.AceConfigDialog:AddToBlizOptions("Sounds", "Sounds", cdalarm.optionpanel)
    	cdalarm.optionpanel_show = cdalarm.AceConfigDialog:AddToBlizOptions("Show when", "Show when", cdalarm.optionpanel)
    	
    	cdalarm.AceConfig:RegisterOptionsTable("CD Alarm", cdalarm.panel.main, {})
    	cdalarm.AceConfig:RegisterOptionsTable("Messages", cdalarm.panel.msgs, {})
    	cdalarm.AceConfig:RegisterOptionsTable("Frame Design", cdalarm.panel.frame, {})
    	cdalarm.AceConfig:RegisterOptionsTable("Colors", cdalarm.panel.colors, {})
    	cdalarm.AceConfig:RegisterOptionsTable("Sounds", cdalarm.panel.sounds, {})
    	cdalarm.AceConfig:RegisterOptionsTable("Show when", cdalarm.panel.show, {})


    Can anyone tell me where I wrent wrong ?
    Posted in: AddOn HELP!
  • 0

    posted a message on listing table in AceConfig
    Hi,
    in my optionpanel I want to list a table that contains a string and 4 booleans, like this:
    scary_table={ {"string", true, true, true, true}, {"string", true, true, true, true}, {"string", true, true, true, true} }

    I want to list this table in the optionpanel with AceConfig.
    So it looks sth. like this:


    description
    toggle, toggle, toggle, toggle

    description
    toggle, toggle, toggle, toggle

    description
    toggle, toggle, toggle, toggle

    ...

    I allready built the objects for one entry of the table:

    type = "group",
    	args = {				
    		grp1= {name = "grp1", type = "group", order=1,
    			args = {
    
    ---------------------------------------
    
    				scary_table_string= {name = scary_table[1][1], type="description", order=101,},
    				scary_table_toggle_one = {
    					name = "this and that",
    					order=102, type = "toggle", width="half",
    					desc = "this and that",
    					set = function(info,val) scary_table[1][2] = val end,
    					get = function() return scary_table[1][2] end,
    					},
    				scary_table_toggle_two = {
    					name = "this and that",
    					order=103, type = "toggle", width="half",
    					desc = "this and that",
    					set = function(info,val) scary_table[1][3] = val end,
    					get = function() return scary_table[1][3] end,
    					},
    				scary_table_toggle_three = {
    					name = "this and that",
    					order=104, type = "toggle", width="half",
    					desc = "this and that",
    					set = function(info,val) scary_table[1][4] = val end,
    					get = function() return scary_table[1][4] end,
    					},
    				scary_table_toggle_four = {
    					name = "this and that",
    					order=105, type = "toggle", width="half",
    					desc = "this and that",
    					set = function(info,val) scary_table[1][5] = val end,
    					get = function() return scary_table[1][5] end,
    					}
    
    ---------------------------------------
    
    				}
    			}
    		}

    But i dont succeed in listing them. I tryed it with a for-loop, but i failed miserable. The code between the lines is the one I want to be shown for each entry of the table. Is this possible with AceConfig?
    Posted in: Ace3
  • 0

    posted a message on AceConfig placing objects
    thanks for the answers ;)
    I allready tested it with a description and am doint it that way currently, just hoped there would be another way
    Posted in: AddOn HELP!
  • 0

    posted a message on Texture DropDownMenu
    I'm allready transfering the old panels to AceConfig. I just didnt want to do that because one panel prints out a whole bunch of data which I could list with a "for"-loop. I don't know how to do that with AceConfig but I'll try since AceConfig is sweet :D
    Posted in: AddOn HELP!
  • 0

    posted a message on AceConfig placing objects
    Hi,

    as far as I understand AceConfig, it places 3 objects per row.
    Is it possible to tell the addon to put an object in a specific place?

    I'd like to have 4 sliders 2 rows. Currently it looks like this:

    slider slider slider
    slider

    I'd prefer
    slider slider (nothing)
    slider slider
    without having to force a new row by placing a header
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.