Calling base class

EAL (Eco Action Language) is fantastic as it allows you to create a complete system without bringing out visual studio or c# at all (nothing is wrong with c# – but it is amazing to be able to execute the model alone). But it had a limitation: when overriding methods there was no way to call the base class implementation of the method.

Now that is fixed by introducing the EAL operation “base” – works just as in c#:

image

Given the OnCreate method (that is called when a object is created).

The RootClass.OnCreate

image

And the Person.OnCreate

image

Note the self.base.OnCreate call that calls the superclass implementation of OnCreate (just as in c#)

And when creating a new Person I get this output:

image

…as in the RootClass added “RA ” and the Person added “PA ”

This entry was posted in EcoActionLanguage. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*