Can anyone explain this?

BlitzMax Forums/BlitzMax Programming/Can anyone explain this?

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.

I think the salent point to the original thread, irrelevent of if you follow Jims code, is
Global Instance:Manager = New Manager;
Where the objects class, (Instance Type), holds an instance of itself, which is self creating

I know this is not a list, which is the real bases of the thread, but I would like to ask Jim:
Why, if as it stands there is to be only one instance of manager
	Field Driver:TGraphicsDriver;
	Field VSync:Int, IsRunning:Byte;
	Field State:Int, OldState:Int;
	Field RandomSeed:Long;
	Field DatabaseFile:String;
	Field DBase:Database;

	'// Delegates
	Field SceneLoadFunc()
	Field SceneInputFunc( time:Float )
	Field SceneRenderFunc( time:Float )
	Field SceneUnloadFunc()
	Field SceneStateFunc( currstate:Int, prevstate:Int )
All these could be Globals of the type, yet have been made fields instead?

Im assuming its because they have no allocation at original referance, but would like your reason if different. Because I would have been tempted to put this
		Self.VSync = True;
		Self.IsRunning = False;
		Self.RandomSeed = GetTickCount();
		Self.DatabaseFile = "data.bin";
		Self.DBase = Database.Create( DatabaseFile );
Into the Field/Global declarations