[Gambas-user] OO

Fabien Bodard gambas.fr at ...626...
Fri Dec 12 19:55:42 CET 2008


dim i as integer
dim tavk as new object[]
dim o as object[]

for i = 0 to 4
  o = new object[]
  tavk.add(o)
next

2008/12/12 Jussi Lahtinen <jussi.lahtinen at ...626...>:
> 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
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list