dev • api • cat • call

Calling Functions

GB.Call Calls a function.
GB_FUNCTION Datatype representing a pointer to a function.
GB.GetFunction Retrieves a function.
GB.Push Pushes some arguments on the interpreter stack.

Overview

These functions allows you to call any public function of any class from a component. This function can be native, or written in Gambas.

First, you must use GB.GetFunction to retrieve sort of a function pointer from the name of the function and the class it is declared in.

Then, you call the function by first pushing arguments on the interpreter stack with GB.Push, and then effectively executing the function with GB.Call.