Self and Base

The objects Self and Base are special in ViviFire.


You use Self to refer to the instance of the class that owns the block of code in which it is used. It shows as an object reference, but you cannot change which object it references. Self is most useful for passing the current object instance to other objects, methods, etc. that require its services.


You use Base to call methods and properties in the parent class from a child class. This is necessary only when you overrode a procedure in your child class. Without Base, you will call the procedure in the child class, and not the one in the parent class.

@Open Class BaseClass
    @Open Method Foo bar
    End Method
End Class

Class DerivedClass Is BaseClass
    @Override Method Foo bar
        Base.Foo bar
    End Method
End Class

See also