View Single Post
  #2  
Unread 11-17-2013, 02:42 PM
Garan's Avatar
Garan Garan is online now
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 341
OK. I actually missed the biggest problem for several minutes. You put parentheses after the base class name when using the class statement but that winds up calling the base class constructor and passing the result of that call, an instance of the class, instead of the class itself.
Code:
myWindowClass=class(Turbine.UI.Lotro.Window());
should be
Code:
myWindowClass=class(Turbine.UI.Lotro.Window);
Next, you need to use the period notation when calling the base class constructor
Code:
Turbine.UI.Lotro.Window:Constructor(self);
should be
Code:
Turbine.UI.Lotro.Window.Constructor(self);
That will eliminate the error you are getting. You probably don't want either the class or the instance declared as local but that is a separate issue and would depend on how they are being used.

If you haven't already checked it out, the thread, https://www.lotro.com/forums/showthr...gins-for-Noobs has two posts, "Function calling" and "Event Handling" which cover handling events as well as firing and handling custom events.

Last edited by Garan : 11-17-2013 at 02:48 PM.
Reply With Quote