Create custom event
As the title suggests, is it possible to create a custom event that can be used as a script?
|
You can't register a custom event but you can
Code:
frame:GetScript("OnEvent")(frame, "my_custom_event", somerarg) |
Ok, I can save a function like this
Lua Code:
Then how can I use the function? Via func() of course, but where and how? |
So, not an event but a frame method (function)
Lua Code:
Code:
frame:SomeFunc(0.5, "something") |
I've created a fairly elaborate frame in XML, which inherits a template. Since writing
Code:
<OnLoad> There is a solution: rewrite the frame code in Lua, but that would be quite cumbersome. Some time ago I read about a little program that converts XML to Lua: does it still exist? Otherwise, what solutions do you recommend? In order to avod wall text, this is my frame coded in XML: https://tinyurl.com/ytmwmbt4, from line 52 to line 72 |
Lua Code:
Will allow the template's OnLoad to run. There's also inherit="append" if processing order is critical. |
All times are GMT -6. The time now is 02:16 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI