Thread Tools Display Modes
03-28-12, 07:14 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Losing all keybinds on actionbar1

I got a really special problem. It's hard to procude aswell. But some people told me that it is there and as far I can tell it should affect TukUi actionbars aswell.

The problem:
Actionbar 1 buttons lose their keybind-reference and cannot be clicked via keybard anymore.
How to produce the problem:
Have a char with a stance. Now go from normal form (normal form, not stance form!) to stance form. Priests can do this for example and druids of course.
Now that you have the bonusbar switch actionbar 1 to bar 2. (default is shift+mousewheel-down I guess). That will bring up bar 2. Now switch out of stance. BÄÄÄÄM. Keybinds do not work. No button is clickable via keyboard. (In fact the keybinds are still intact but the reference is still the bonusbar and if you try to cast a stance button it obviously does not work because you are out of stance now.)
I have no clue how to fix that and searching for advice.

Biggest problem is a stable test example. Trying to reproduce one with my druid later. What I know for sure is that you have to switch from normal to bonusbar to bar 2 and then get out of your stance. Not sure about other circumstances though.

Here is my implementation taken from rActionBarStyler:
http://code.google.com/p/rothui/sour...rs/bar1.lua#34

lua Code:
  1. --init bar
  2.   local bar = CreateFrame("Frame","rABS_MainMenuBar",UIParent, "SecureHandlerStateTemplate")
  3.   --...
  4.  
  5.   local Page = {
  6.     ["DRUID"] = "[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;",
  7.     ["WARRIOR"] = "[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;",
  8.     ["PRIEST"] = "[bonusbar:1] 7;",
  9.     ["ROGUE"] = "[bonusbar:1] 7; [form:3] 10;",
  10.     ["WARLOCK"] = "[form:2] 7;",
  11.     ["DEFAULT"] = "[bonusbar:5] 11; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;",
  12.   }
  13.  
  14.   local function GetBar()
  15.     local condition = Page["DEFAULT"]
  16.     local class = cfg.playerclass
  17.     local page = Page[class]
  18.     if page then
  19.       condition = condition.." "..page
  20.     end
  21.     condition = condition.." 1"
  22.     return condition
  23.   end
  24.  
  25.   bar:RegisterEvent("PLAYER_LOGIN")
  26.   bar:RegisterEvent("PLAYER_ENTERING_WORLD")
  27.   bar:RegisterEvent("KNOWN_CURRENCY_TYPES_UPDATE")
  28.   bar:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
  29.   bar:RegisterEvent("BAG_UPDATE")
  30.   bar:SetScript("OnEvent", function(self, event, ...)
  31.     if event == "PLAYER_LOGIN" then
  32.       local button, buttons
  33.       for i = 1, NUM_ACTIONBAR_BUTTONS do
  34.         button = _G["ActionButton"..i]
  35.         self:SetFrameRef("ActionButton"..i, button)
  36.       end
  37.  
  38.       self:Execute([[
  39.         buttons = table.new()
  40.         for i = 1, 12 do
  41.           table.insert(buttons, self:GetFrameRef("ActionButton"..i))
  42.         end
  43.       ]])
  44.  
  45.       self:SetAttribute("_onstate-page", [[
  46.         for i, button in ipairs(buttons) do
  47.           button:SetAttribute("actionpage", tonumber(newstate))
  48.         end
  49.       ]])
  50.  
  51.       RegisterStateDriver(self, "page", GetBar())
  52.     elseif event == "PLAYER_ENTERING_WORLD" then
  53.       local button
  54.       for i = 1, 12 do
  55.         button = _G["ActionButton"..i]
  56.         button:SetSize(barcfg.buttonsize, barcfg.buttonsize)
  57.         button:ClearAllPoints()
  58.         button:SetParent(self)
  59.         if i == 1 then
  60.           button:SetPoint("BOTTOMLEFT", bar, 0,0)
  61.         else
  62.           local previous = _G["ActionButton"..i-1]
  63.           if barcfg.uselayout2x6 and i == 7 then
  64.             previous = _G["ActionButton1"]
  65.             button:SetPoint("BOTTOMLEFT", previous, "TOPLEFT", 0, barcfg.buttonspacing)
  66.           else
  67.             button:SetPoint("LEFT", previous, "RIGHT", barcfg.buttonspacing, 0)
  68.           end
  69.         end
  70.       end
  71.     else
  72.        MainMenuBar_OnEvent(self, event, ...)
  73.     end
  74.   end)

All 12 actionbuttons on bar1 get a frame reference and the bar switches _onstate-page.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 03-28-12 at 07:34 AM.
  Reply With Quote
03-30-12, 10:56 AM   #2
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Hi Zork

I was not able to reproduce your error with your addon load alone.

When you leave the stance form, did you do a shift+mousewheel-up to get the main first bar back ?

Cheers
Sigg
__________________
RDX manager
Sigg
  Reply With Quote
04-02-12, 02:37 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
That's my problem too. I cannot set up a stable test. I cannot reproduce it. Maybe it's a bug that only occurs on pretty wierd scenarios. Maybe some kind of taint that has yet to be tracked does interferre (or the Blizzard Talent UI who knows...). I have no clue.

Thanks for trying to help. Gonna leave it for now since I cannot find any clue.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
04-03-12, 11:49 PM   #4
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
* * * RegisterStateDriver(self, "page", GetBar())

Verify if you don't call this function with the same id

Can have strange behaviours

That's all I have in mind
__________________
RDX manager
Sigg
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Losing all keybinds on actionbar1


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