WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Efficient LUA code? (https://www.wowinterface.com/forums/showthread.php?t=21444)

Tekkub 04-14-09 05:04 PM

Totally depends on your design. If you already have the frames for display, and the related events/handlers are simple, it's probably best to assign them directly to the frame and make good use of self. If you don't have the frames, a central dispater is fine if you write it well. You can make a dispatcher in a single line of code that works wonderfully...

f:SetScript("OnEvent", function(self, event, ...) if self[event] then return self[event](self, event, ...) end end)


All times are GMT -6. The time now is 06:41 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI