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.

The game type has a list of shapes in play, and the shape methods need to know about what game they are updating when they do stuff.


I don't fully understand why this is wrong and how it fits with the advice given or the initial question asked.
Isn''t this simply
type Tgame
   field shapes_inplay:tlist   ' pointing to tshape.list
end type
type tshape
  global list:tlist=createlist()
  field parent:tgame
end type

I do this and don't have a problem (unless I am missing something). It matches the statement I quoted but not the original posted question so I must have confused something.