Forum Navigation
You need to log in to create posts and topics.

Re: Super Trooper?

Posted by: microcsm <microcsm@...>

Terence Jordan wrote:

>In FB^III, can you override a method:
>
>METHOD DrawRect
> CALL SETFORECOLOR(_redColor)
> Super()
>END METHOD
>
>Do you see what happens here? At the "Super" point, it then resumes the
>Superclass definition of DrawRect after doing a programmer specified
>action.
>
>I know in java this is more than useful.

Yes and no. 🙂 The keyword you use is different, but the effect is the
same:

METHOD DrawRect
SetForeColor(_redColor)
FrameRect(self.oRect)
INHERIT
END METHOD

This method first frames the object rect in red and then inherits the
DrawRect method of this classes superclass. You can inherit at any point
in a method. Cool?

========================================
| David Blache - Developer |
========================================
| Staz Software, Inc - Stazologist |
| (tech@stazsoftware.com) |
| Microcosm Software, Inc. - Owner |
| (microcsm@goldinc.com) |
========================================