Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a list of existing objects in VFP 9?

Status
Not open for further replies.

albertl

Programmer
Joined
Mar 6, 2005
Messages
10
Location
US
I want to get a list of existing objects (in my case they are non-visual objects) which are created through CreateObject() during runtime. So, I can loop through the list and retrieve the value of all the properties.


Thanks.
 
You can use LIST OBJECTS TO FILE MyObjs.TXT.
If you use some sort of standard naming convention like prefacing your objects with 'o', you can limit it to only the ones you create:
LIST OBJECTS LIKE o* TO FILE MyObjs.TXT.

From there, you can parse the file and loop through the object using something like:
FOR EACH item IN oMyObject.Controls
?item.name
NEXT



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top