[Gambas-user] OO

Jussi Lahtinen jussi.lahtinen at ...626...
Fri Dec 12 17:34:29 CET 2008


Object Oriented approach is pretty new to me, so...

PUBLIC tavk AS Object[2]

tavk[0] = NEW Object[]
tavk[1] = NEW Object[]

  This works, as I want to create two object arrays.
  But I need it to be dynamic array of array of objects, is it possible somehow?
  Other words, I need to add tavk[] objects dynamically.

Example, is it possible to create objects like described below, if so how?
If I have object called atom, which contains dynamic array of objects
called electrons
(different atoms contains different amount of electrons).
Is it possible to add different atoms dynamically?
And then change them later (add or remove electron [example if atom
becomes ion])?


Jussi




More information about the User mailing list