DGS OOP Class: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*'''The built-in functions are non-modifiable''' | *'''The built-in functions are non-modifiable''' | ||
*'''Any variable of the table are get/set via [[dgsSetProperty]]/[[dgsGetProperty]]''' | *'''Any variable of the table are get/set via [[dgsSetProperty]]/[[dgsGetProperty]] ( Exclude DGSElement )''' | ||
==Start== | ==Start== | ||
Instead of using | Instead of using |
Revision as of 07:34, 15 November 2018
DGS provides not only POP ( Procedure Oriented Programming ) but also OOP ( Object Oriented Programming ). This page introduces OOP of dgs.
Structure
When using DGS OOP, DGS objects being operated are no longer elements, instead, they will be tables ( table is the only type whose call methods can be defined in lua ) . Here is the structure of DGS OOP Object:
DGSDxObject = { DGSElement = DGSElement -- The actual dgs element function1, function2, ... }
- The built-in functions are non-modifiable
- Any variable of the table are get/set via dgsSetProperty/dgsGetProperty ( Exclude DGSElement )
Start
Instead of using