Extending Singletons?

BlitzMax Forums/BlitzMax Programming/Extending Singletons?

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.

Depends on what you exactly want to achieve.

Globals within a type only exist ones within all extended types.
If you want to prevent that more than 1 instance is created, how about a global that saves the single allowed instance?
If a further one should be created just return that already existing one.

There are many ways like that, don't know if this is actually a way for you ...