Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Autostarting objects
Message
De
21/01/2004 10:46:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Autostarting objects
Divers
Thread ID:
00869018
Message ID:
00869018
Vues:
46
An object based on a class can be created and run in two separate commands, like this:
oObject = CreateObject("SomeClass")
oObject.Run(par1, par2)
Or in a single command like this:
oObject = CreateObject("SomeClass", par1, par2)
I am assuming that there is a Run() method that does the actual work, and that in the second case, the Init() method accepts the parameters, and passes them to the Run() method.

I would like to hear some opinions, on which syntax is preferable.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform