Quantcast SetBinding issues - WoWInterface
Thread Tools Display Modes
02-13-20, 02:07 AM   #1
doofus
A Flamescale Wyrmkin
Join Date: Feb 2018
Posts: 126
SetBinding issues

Hello.

I have used SetBinding to tie keystrokes to macros. These are saved in bindings-cache.wtf.

If I change the binding key of a macro, the old binding is still present in this file, and I cannot get rid of it, or know what other bindings this macro has. The only solution is to manually delete bindings-cache.wtf.

Is there an API I can use to delete all bindings present for a specific macro ?

Thanks
  Reply With Quote
02-13-20, 06:02 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,906
You can send nil as (or completely omitt) the second argument to SetBinding() to remove the key from all bindings.

I don't know if GetBinding() works on custom bindings. It might not.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 02-13-20 at 06:10 PM.
  Reply With Quote
02-16-20, 03:52 AM   #3
doofus
A Flamescale Wyrmkin
Join Date: Feb 2018
Posts: 126
Thank you, however it is the opposite function I need,

1) delete all key-bindings for a specific macro without knowing how many bindings exit for that macro
2) delete all key-bindings for all macros
  Reply With Quote
02-17-20, 05:11 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,906
Originally Posted by doofus View Post
Thank you, however it is the opposite function I need,

1) delete all key-bindings for a specific macro without knowing how many bindings exit for that macro
2) delete all key-bindings for all macros
Reiterating:
Originally Posted by SDPhantom View Post
I don't know if GetBinding() works on custom bindings. It might not.
On another note, if you know the command string, you might try GetBindingKey(), but like the other function, I don't know if this works on custom bindings. If neither of them do, then you're out of luck. That's all the API has for iterating through permanent ones.

There is a series of functions for override bindings, but that's a completely different system.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » SetBinding issues

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