Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating & referencing unique object names
Message
De
21/06/1998 01:21:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Generating & referencing unique object names
Divers
Thread ID:
00110322
Message ID:
00110322
Vues:
51
Say I have a class that adds an object to a form. How do I generate and reference a unique object name?

Example:
If the object method does:
THISFORM.AddObject("bob", "Line")
then this might be bad because "bob" may already exist

Do I do something like:
THIS.cAddedObject = SYS(2015) && init my reference to added object
THISFORM.AddObject(THIS.cAddedObject, "Line") && add the object

And if this is right, then how do I de-reference it?
THIS.cAddedObject.height = 10
gives an error because THIS.cAddedObject is a string not an object.


Thanks,
Bob
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform