public goFactory goFactory = CREATEOBJECT("cusFactory") DEFINE CLASS cusFactory as Custom ADD OBJECT ioSingleton as "collection" FUNCTION new(tcClass,tcLib) WITH THIS IF .ioSingleton.GetKey(tcClass) = 0 DEBUGOUT "create object" .ioSingleton.Add(NEWOBJECT(tcClass,tcLib),tcClass) ENDIF DEBUGOUT "return reference" RETURN .ioSingleton(tcClass) ENDWITH ENDFUNC ENDDEFINEYou could hang the factory off _SCREEN, or your own goApp object, however you manage such things.