Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create an object in a class
Message
From
02/02/2006 04:22:37
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01092108
Message ID:
01092736
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
Hi Zakaria,
oPerson = createobject("Person")
oTime = createobject("Time")
oPerson.Init(oTime)
oPerson.GetAge()
this is not the way to pass parameters to the INIT event of an object.
The INIT is an event and not a method thats intended to be called by the developer.
Its called/fired automaticly during the creation process of that object. If you want to pass one or more parameters, you should use the additional parameters of the createobject() function.
oTime = createobject("time")
oPerson = createobject("person", oTime)
Holger Vorberg
Germany
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform