Another thing to note is the main file gives you a great place to instance and access your classes (or windows) that way you have one place where you can see what all your windows are doing and how they are diffrent. It also gives you the ability to pass one instance into another or compare data between them, or create a class whithin a class (such as a subwindow).
I found that most of my "real" logic ended up in main so that it could access and pull data from everywhere and my window classes had minimal logic, mostly just layout. |
Wow, thanks DU, that should be stickied.
I guess that my problem is this; When I add this to SetupWindow.lua Code:
Code:
Code:
if ( SetupWindow.locked:IsChecked(true) ) then ...Rings Online\Plugins\Olenn\Satchel\SatchelWindow.lua:51: attempt to index field 'locked' (a nil value) It would seem to me that SetupWindow.locked should point to that in the SetupWindow.lua. Now, I am obviously missing something because I completely ignored the line that you wrote about adding a conditional. I am not even quite sure what a conditional is. I have been digging through lua.org, though, I just haven't been successful yet. |
Quote:
but basically what the problem is that you need to start off in Main declaring an instance of both SetupWindow and SatchelWindow, and do your if/then/else within that: eg: in Main.lua Code:
setWindow = SetupWindow(); |
Okay, I think I understand everything, and I am pretty sure that I have everything where is is supposed to go. I just got the error;
...d of the Rings Online\Plugins\Olenn\Satchel\Main.lua:63: attempt to call method 'IsChecked' (a boolean value) I know that a boolean in a 'true / false' statement, but what is this error trying to tell me? Oh yeah, the line it is calling is; Code:
61 SetupWindow.locked.CheckChanged=function(sender,args) |
All times are GMT -5. The time now is 09:44 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI