Inheritance/Multiple: Difference between revisions

Content added Content deleted
(Lingo added)
Line 671: Line 671:
on new (me)
on new (me)
c = script("Camera").new()
c = script("Camera").new()
p = script("MobilePhone").new()
mp = script("MobilePhone").new()


-- make the Camera instance a parent of the MobilePhone instance
-- make the Camera instance a parent of the MobilePhone instance
p.setProp(#ancestor, c)
mp.setProp(#ancestor, c)


-- make the MobilePhone instance a parent of this CameraPhone instance
-- make the MobilePhone instance a parent of this CameraPhone instance
me.ancestor = p
me.ancestor = mp


return me
return me