mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixed error with __
Had to test for the presence in raw format, not using __Index
This commit is contained in:
@@ -234,7 +234,7 @@ function BASE:New()
|
|||||||
|
|
||||||
-- This is for "private" methods...
|
-- This is for "private" methods...
|
||||||
-- When a __ is passed to a method as "self", the __index will search for the method on the public method list too!
|
-- When a __ is passed to a method as "self", the __index will search for the method on the public method list too!
|
||||||
if self.__ then
|
if rawget( self, "__" ) then
|
||||||
setmetatable( self, { __index = self.__ } )
|
setmetatable( self, { __index = self.__ } )
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ function BASE:Inherit( Child, Parent )
|
|||||||
|
|
||||||
-- This is for "private" methods...
|
-- This is for "private" methods...
|
||||||
-- When a __ is passed to a method as "self", the __index will search for the method on the public method list of the same object too!
|
-- When a __ is passed to a method as "self", the __index will search for the method on the public method list of the same object too!
|
||||||
if Child.__ then
|
if rawget( Child, "__" ) then
|
||||||
setmetatable( Child, { __index = Child.__ } )
|
setmetatable( Child, { __index = Child.__ } )
|
||||||
setmetatable( Child.__, { __index = Parent } )
|
setmetatable( Child.__, { __index = Parent } )
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user