Storing a reference to an object ...

BlitzMax Forums/BlitzMax Programming/Storing a reference to an object ...

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.

Well, I couldn't create a widget field in a widget type to store the widget, etc... (good old recursive declarations).

This shouldn't work:
Type widget
     Field Parent:widget new widget


So I tried to find another way to store the location to the parent. Perhaps it would work without the "new widget", but I ended up going with a "ParentList:TList", because I realized one case where I might have to have more than one parent. I'm still curious if there is another (more efficient) way to store a parent, though. Besides, I could use some practice/experimentation with pointers and pointer references to variables, anyway...