Lua Error Help First Addon
Hey,
Trying my first addon and getting an error I haven't been able to solve. Probably something simple and stupid. Quote:
Lua Code:
YazClock.xml Code:
<GuiXml> |
And yc:SetHandler does exist?
|
Thanks Iyanga for pointing out my stupidity :) I knew it was something simple and silly that I was missing.
For others I added code to create a mainwindow in lua, got rid of XML and then set the handler on the mainwindow and it works. Lua Code:
|
As a side note:
Is there a reason why you wrap an anonymous function around yc:OnAddOnLoaded in line 30? |
To clarify why it wasn't working, in your first code example (in the first post), yc is not a control/object. Script handlers can only be set on controls.
|
Quote:
I've got a new problem now in that even though I'm setting my handler for OnUpdate it's not being called afterwards. Code below, have bit ugly since I've been editing it back and forth while debugging. Lua Code:
I've had the SetHandler also set to: lua Code:
Quote:
|
All times are GMT -6. The time now is 02:46 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI