[Gambas-user] save and load an array of MydataType

Benoit Minisini gambas at ...1...
Thu Jan 6 16:19:34 CET 2005


On Thursday 06 January 2005 12:59, Jochen Georges wrote:
> Hello gambanauts,
>
> I do not find a way on my own :(
> I have an array wich is filled with objects of the class CCar.
> I would like to save and load this array.
> I found a way to do that if i know how much elements the array contains.
> But I do not find a way, if I do not know how much elements the array
> contains.

FOR i = 0 TO arCars.Count - 1
  arCars[i].writeTo(myFile)
NEXT

should behave correctly.

Another non-related point Jochen: in the GambasIndexByCategory Wiki page, you 
have moved the file-related -functions- with the file-related -instructions-.

Why ?? Can you rollback these changes, so that functions and instructions keep 
separate ? 

Or we can mix them all. But there must be some logic...

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list