Quote:
Originally Posted by Kryso
Yea this would work if you created the function in another function, so it would take self from parent scope - which is in a lot of cases bad practice, because it would create new function on every call. I mean it is usefull sometimes, but it shouldn't be used so we can call functions that are supposed to have "self" reference with dot operator.
|
Except most "class" definitions are technically functions. eg:
Code:
MyWindow = class( Turbine.UI.Window )
function MyWindow:Constructor()
Turbine.UI.Lotro.Window.Constructor( self )
end
And, given that it isn't a local function, (i.e. something that will never be called from outside the class), wouldn't it make sense to make a unique copy of that function for every instance of the class?