How I can do a Singleton Pattern Class in VFP?
I need a Object create one and only one time.
I know if I return .F. in the Init Event the object isn´t create.
But, what I needed is return a reference the object is created already.
Something like that:
oFirstObject = CREATEOBJECT("MySingletonClass")
oSeconObject = CREATEOBJECT("MySingletonClass")
The second CREATEOBJECT("MySingletonClass") don´t create a new object, it return a reference to oFirstObject.
Thanks in advance.
José Luis.
Quidquid latine dictum sit, altum sonatur