Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating & referencing unique object names
Message
From
21/06/1998 01:21:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Generating & referencing unique object names
Miscellaneous
Thread ID:
00110322
Message ID:
00110322
Views:
52
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
Next
Reply
Map
View

Click here to load this message in the networking platform