Two types need to know about each other

BlitzMax Forums/BlitzMax Beginners Area/Two types need to know about each other

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

@Czar Flavius : What you're doing sounds perfectly fine.
It's perfectly ok to have a parent reference. It's usefull for all sorts of stuff.
I'd usually put the list in the parent type like this:

type Tgame
   field shapes_inplay:tlist = New tlist 
end type

I don't get tonyg's "' pointing to tshape.list" comment.

The usefull thing is that each Tgame type can have its own list of shapes.
As far as I can tell tonyg ends up with only one list for the tshape type.