Thread Tools Display Modes
05-27-10, 12:53 PM   #1
mentalnutsy
A Cyclonian
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 47
Auto change options?

Ok I'm using ace3 to setup my options but is it possible to disable one option when another is enabled automatically e.g


Code:
				raidannounce = {   when this option is enabled
					type = "toggle",
					name = "Raid",
					desc = "Enables Raid announcements.",
					get = "raidannounceenabled",
					set = "raidannouncedisable",
				},
				raidwarningannounce = { this one would auto disable
					type = "toggle",
					name = "Raid Warning",
					desc = "Enables Raid Warning announcements.",
					get = "raidwarningannounceenabled",
					set = "raidwarningannouncedisable",
				},

Is this possible and how would it be done?
  Reply With Quote
05-27-10, 01:14 PM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Code:
					get = "raidwarningannounceenabled",
					set = "raidwarningannouncedisable",
					disabled = raidannounceenabled,
I'm not sure why you're using strings for your variables, instead of something like
Code:
get = raidwarningannounceenabled,
or even

Code:
get = function()
                return raidwarningannounceenabled
        end,
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.

Last edited by Torhal : 05-27-10 at 01:17 PM.
  Reply With Quote
05-27-10, 01:39 PM   #3
mentalnutsy
A Cyclonian
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 47
works like a charm thanks
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Auto change options?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off