singleton usage [message #47612] |
Tue, 21 February 2006 05:34 |
vcarlos
Messages: 21 Registered: February 2006
|
Junior Member |
|
|
Hi all,
maybe it is the dumbiest question of all time about singleton, but
since I am in doubt, is better ask thank keep it :)
When you define a singleton object, everywhere in the program you use
it you must call something like this: myObject = Obj_New('Singleton'),
and then myObject will point to the same instance created before. That
is fine to me, but what I have doubt is about the usage of this feature
in my program, since everytime I want access that object I will need to
write the same statement above, or set an attribute in a class to point
to the singleton instance, right?
What if, instead of doing that, I create an read only system variable
holding the object that I want use over the program?
I know I lost some features, but is not it more useful?
Well, that is it. Thanks
(sorry about my english)
Vinicius
|
|
|