Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you have Singleton objects in VFP?
Message
From
09/07/2003 09:57:03
 
 
To
09/07/2003 09:45:36
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00808442
Message ID:
00808469
Views:
27
Yes, I was thinking of having a class that could return references to it's own instances of the required classes.

Thanks

Kev

>I doubt you can do it the normal way. Load and Init are events, not methods. You'd have to have whatever class is creating the object first check to see if it already exists and then instantiate it or not as required. It could be as simple as checking "Type('MyObject.Name') = 'C'
>
>I suppose you might do it in the Load, but I think it would be simple to do it before.
>
>Alan
>
>>Hi
>>
>>Is this possible from VFP?
>>
>>Thanks
>>Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform