Given these definitions:
<type name="BaseA">
<attr1>foo</attr1>
</type>
<object name="Obj1">
<inherit name="BaseA"/>
<attr1>bar</attr1>
</object>
what will this code print out?
msg ("Before Obj1.attr1 = " + Obj1.attr1)
Obj1.attr1 = null
msg ("After Obj1.attr1 = " + Obj1.attr1)
The answer is:
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
v
Before Obj1.attr1 = bar
After Obj1.attr1 = foo
Maybe that was clear to everyone, but it confirms a bit for me how types are used in Quest - and that attribute lookup is done dynamically at runtime.
The reason why this happens is that assigning null to attr1 in Obj1 removes the attribute from that object - and the attribute in the base type then shows through. So... if you have an attribute in a base type, there is *no way* to get rid of it. Ever.