View Single Post
  #10  
Unread 10-08-2010, 06:37 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
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?
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote