Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you have Singleton objects in VFP?
Message
De
09/07/2003 11:19:22
 
 
À
09/07/2003 11:06:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00808442
Message ID:
00808517
Vues:
16
It's really the same thing we were discussing, but he is doing it in the init. He has a method 'IAmAlone' in the object and it contains code to check for another instance of it, and will instantiate it if not.

Alan

>>>Hi
>>>
>>>Is this possible from VFP?
>>>
>>>Thanks
>>>Kev
>>
>>Is the most near I´m from a Singleton Pattern in VFP ;-D
>>
>>
>>
>>*-- Init Method - pseudo-Singleton
>>*--
>>LPARAMETER loMyObject
>>loMyObject = .NULL.
>>
>>loMyObject = THIS.IAmAlone()
>>
>>IF ISNULL(loMyObject)
>>
>>ELSE
>>
>>ENDIF
>>
>>
>>
>
>Jose
>
>You might need to talk me through this, I can't quite see this....
>
>Thanks
>Kev
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform