View Single Post
03-17-19, 01:25 PM   #3
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi Terenna,

thanks for your help again ...

I have tried your code but I got an error ... do you have some clues ?

The code:

Lua Code:
  1. local secureFrame = CreateFrame('frame', nil, UIParent, 'SecureActionButtonTemplate')
  2. secureFrame:SetFrameRef('MultiBarRight', MultiBarRight)
  3. secureFrame:Execute([[
  4.      multiBarRightSecureTable = table.new()
  5.      multiBarRightSecureTable[1] = secureFrame:GetFrameRef('MultiBarRight')
  6. ]])
  7.  
  8. MultiBarRight:HookScript('OnSizeChanged', function()
  9.      secureFrame:Execute([[
  10.           if multiBarRightSecureTable[1]:GetScale() > 0.81 then
  11.                multiBarRightSecureTable[1]:SetScale(0.8)
  12.           end
  13.      ]])
  14. end)

The error:

Lua Code:
  1. 1x gmActionBars\core.lua:5: attempt to call method 'SetFrameRef' (a nil value)
  2. gmActionBars\core.lua:5: in main chunk
  3.  
  4. Locals:
  5. ADDON = "gmActionBars"
  6. secureFrame = <unnamed> {
  7.  0 = <userdata>
  8. }
  9. (*temporary) = nil
  10. (*temporary) = <unnamed> {
  11.  0 = <userdata>
  12. }
  13. (*temporary) = "MultiBarRight"
  14. (*temporary) = MultiBarRight {
  15.  0 = <userdata>
  16.  slideOut = <unnamed> {
  17.  }
  18. }
  19. (*temporary) = "attempt to call method 'SetFrameRef' (a nil value)"

Thanks everyone for attention.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote