Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return value of NewObject()
Message
From
24/04/2002 10:50:45
Beth Wetherbee
Virginia Beach Public Schools
Virginia Beach, Virginia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Return value of NewObject()
Miscellaneous
Thread ID:
00648685
Message ID:
00648685
Views:
42
If I type this code in the command window:

oStudent = NEWOBJECT('student', 'student.vcx')

and the Init of the student class returns .F., then the value of oStudent is .F., leading one to believe that the NEWOBJECT() function is returning .F. if the object does not instantiate (which I expected).

However, if I run this code:

oForm = NEWOBJECT('myform', 'myformclass.vcx')
?oForm.NewObject('oStudent', 'student', 'student.vcx')

and the Init of the student class returns .F., the return value of ?oForm.NewObject() is .T., even though the student object didn't instantiate, which seems weird to me.

Can someone tell me why This.NewObject() would return a .T. even if the object being created by NewObject did not instatiate?

TIA
Beth Wetherbee, MCSD
VBCPS
Next
Reply
Map
View

Click here to load this message in the networking platform