Calling the Overridden Method


Normally, when you override a method, you want the new method to replace the overridden method, but there are also times when you want the new method to merely add a few steps to the parent method. You can do this by calling "super" on the method.

When deciding which method to call, REALbasic starts at the lowest level of the class hierarchy and looks to see whether the method is implemented there. If it is not, REALbasic checks the parent class, and so on, until it finds an implementation of the method. Because of this approach, as soon as it finds an implementation of the method, it stops looking and never touches any implementation further up the hierarchy.




REALbasic Cross-Platform Application Development
REALbasic Cross-Platform Application Development
ISBN: 0672328135
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net