Combining Proto and Parent Inheritance
inherited
for a method, lookup will only search the proto chain. If you have overridden a method from your parent, and then attempt to use inherited
to call the parent version, you'll get a runtime error. This happens because inherited
never searches in the parent.
Sending the same message to your parent will call the overridden method, but the value of self
will change from its current value to the parent frame. This may cause the parent method to operate differently. A different self
can have some effects you won't particularly like in your code.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996