Data Access Worldwide Knowledge Base
Article ID 2143 Article Title INFO: Number of Objects Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2143 KBase Category VDF (GENERAL) Date Created 07/13/2005 Last Edit Date 07/14/2005
Article Text
QUESTION:
Where can I see how many objects I have in my compiled program?
ANSWER:
You cannot get the number of objects at compile time since they are not created at that time; objects are created at runtime. You can also create and destroy objects dynamically. This technique is used at several locations in the product (for example, with XML).
To get the total number of objects at a certain moment you can use the global variable TOTAL_OBJECTS.
To get the number of child objects of a certain object, you can send the message Child_Count.
SYNTAX:
Send Info_Box Total_Objects
Get Child_Count Of oSomeObject To iNumberOfChildObjects
NOTE:
The documentation of VDF11 and before list a maximum of 32k child objects. This limit was lifted with the 8.3 release. You can now have a fairly unlimted number of child objects.
Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu
Web Links Related to this Article
BT 1146 - Major Improvement in how VDF creates and destroys dynamic objects
URL=http://www.dataaccess.com/bugtracker/PrintBug.asp?ArticleID=1146
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.