RosettaCodeData/Task/Inheritance-Multiple/Lingo/inheritance-multiple-3.lingo

16 lines
331 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
-- parent script "CameraPhone"
property ancestor
on new (me)
c = script("Camera").new()
mp = script("MobilePhone").new()
-- make the Camera instance a parent of the MobilePhone instance
mp.setProp(#ancestor, c)
-- make the MobilePhone instance a parent of this CameraPhone instance
me.ancestor = mp
return me
end