On Wed, Nov 30, 2016 at 5:27 PM, <nand...@nothingsimple.com> wrote:

> I use structs to write binary to a file in struct order.
> Nice and easy.
> Not so easy with a class.
>
> Your example is possible.  I have done similar.
>
> The STRUCT only defines the structure...it doesn't create the memory
> allocation.
> Static Private WorldMap[100, 100] As MapObject  just defines arrays to
> point to objects.
> You need to run code to actually create new objects at each array element.
> hint:
> Loop  x
>  Loop  y
>    [x][y] = new MapObject  'the new actually creates a memory allocation
> for it.
>

Fernando,

good to know that it can be done using this approach if necessary.

Cheers

-- Cam
------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to