Thread Tools Display Modes
09-07-11, 11:54 PM   #1
taurouset
A Deviate Faerie Dragon
 
taurouset's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 11
KeyBindings

I'm attempting to add keybindings to an addon but I can't quite figure it out. I'm trying to get help from http://www.wowwiki.com/Using_binding...for_your_addon but it isn't helping.

What I have so far is a file called "bindings.xml" that has:
Code:
<Bindings>
	<Binding name="CASHCOUNTER_SHOWHIDE" header="CASHCOUNTER_TITLE">
		if (CC_Title:isShown()) then
			CC_Toggle('hide');
		else
			CC_Toggle('show');
		end
	</Binding>
	<Binding name="CASHCOUNTER_LOCKUNLOCK">
		CC_Vars.locked = not CC_Vars.locked;
		if (CC_Vars.locked == true) then
			CC_Message(CASHCOUNTER_LOCKED);
		else
			CC_Message(CASHCOUNTER_UNLOCKED);
		end
	</Binding>
</Bindings>
But I get an error:

Code:
Message: [string "CASHCOUNTER_SHOWHIDE"]:1: function arguments expected near ')'
Time: 09/07/11 22:53:08
Count: 1
Stack: 
Locals:
Can anyone help?

EDIT: I previously had CC_Title:isShown, so that got rid of the error. Although in the keybindings it still shows:

CASHCOUNTER_SHOWHIDE [not bound] [not bound]
CASHCOUNTER_LOCKUNLOCK [not bound] [not bound]

With a space above where the header should be.

Does it need to know of my enUS.lua?

Do I need to include bindings.xml in the .toc for my addon?

EDIT: With some good old "let's see if this works" I figured it out.

Last edited by taurouset : 09-08-11 at 12:44 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » KeyBindings


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