Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation from source code
Components
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Arithmetical Functions
Arithmetic Operators
Array Declaration
Assignment Operators
Assignments
Binary Data Representation
Bits Manipulation Functions
Character Test Functions
Comparison methods
Complex numbers
Constant Declaration
Constant Expression
Conversion Functions
Datatype Functions
Datatypes
Date & Time Functions
Enumeration declaration
Error Management
Event Loop
Event Management
Events declaration
Expressions
External Function Management
File & Directory Functions
File & Directory Paths
File mode syntax
Floating Point Numbers
Formatting functions
Gambas Object Model
Global Special Event Handlers
Integer numbers
Intrinsic Functions
Language Constants
Localization and Translation Functions
Local Variable Declaration
Logarithms & Exponentials Functions
Logical Operators
Loop Control Structures
Method Declaration
Miscellaneous Control Structures
Miscellaneous Functions
Native Arrays
Native Container Classes
Object & Class Management
Operator Evaluation Order
Predefined Constants
Process Management
Property Declaration
Random Numbers Functions
Special Methods
Stream & Input/Output functions
String Functions
String Operators
Structure declaration
Test Control Structures & Functions
Trigonometric Functions
User-defined formats
Using reserved keywords as identifiers
Variable Declaration
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Special Methods

Special methods are methods declared in classes, whose name begins with an underscore character, and that are called by the interpreter in the following situations:

_attach When an object is attached to or detached from its parent.
_call When using an object as if it is a function.
_compare When comparing an object with another one.
_free When an object is being freed.
_get When reading an object as if it is an array.
_init When the object class is loaded.
_next When enumerating the object.
_new When an object is created.
_property To know if an unknown symbol is a method or a property.
_put When writing to an object as if it is an array.
_read When unserializing an object from a stream.
Since 3.15
_ready When an object construction is finished, and an object is ready to be used.
Since 3.9
_unknown When trying to use an unknown object method or property.
_write When serializing an object to a stream.
Since 3.15