sorry for not replying. I haven't watched this thread in quite some time. I hope you got what you needed from Gello's post. He explained it exactly as it should be. 'this' is a reserved keyword that references the source frame or element that triggered the script function. It will ALWAYS return with whatever called the function.
OOP is a useful thing to learn when making addons. You might consider looking up info on OOP programming on the web, as it could explain a lot of things that we simply can't think of to tell you here. Basically it is a way or organizing your code logically, which makes it easier for you, and anyone else looking at the code afterwards. Example: (I made this up) Code:
MyMod = { So for example, assuming that MyMod.ConfigOptions is a saved variable: MyMod.ConfigOptions.PlayerData = MyMod.get.unit("player"); This would store a table in the config options that contains name, sex, race, class, level, and rank for the player using your mod. Hope this gives you more ideas on what is possible with OOP. |
I love you! That made sens! And lots of it! WoW! I'm understanding tables and XML! Weeehhhhaaaa!!!!! Thank you so much :D
|
Quote:
and a few question :) 1.is that mean I can define function for widget in this way? for instance. i got a Frame named MyFrame and a button in it call MyButton. if I want define their OnLoad and OnClick function can I do it like this? Code:
MyFrame = {}; MyFrame.MyButton.OnClick() how can i do? or is it possible for lua? 2. someone messed their code and i re-make them at first, i don't know it.through your way, i got it a little :) and still need your help Code:
Oo0o0oOO = {} but i was confused by the form....what's the form mean...... i never saw codes like this ...... i know what they try to do is confused me....but i try to catch it and improve my knowledge. :p |
All times are GMT -6. The time now is 09:03 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI