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() |
||
mp = script("MobilePhone").new() |
|||
-- make the Camera instance a parent of the MobilePhone instance |
-- make the Camera instance a parent of the MobilePhone instance |
||
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 = |
me.ancestor = mp |
||
return me |
return me |