Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PRG Classes and Forms
Message
 
 
À
10/07/2007 15:32:18
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01239057
Message ID:
01239065
Vues:
13
>>>I think this won't work, but I want to have a method in my form that calls a method and in that method classes are defined... or something like that. Can I mix forms with text-based classes? Do I have to put them into the Main program that calls the form? Thanks!
>>
>>You may have a separate procedure (or it can be your main procedure) with classes definitions. You can set procedure to this program or use NewObject() function to instantiate your classes.
>
>I'm not sure that cleared it up for me. Can the classes be defined in my Main program? Can I use DEFINE and NEWOBJECT inside methods of the form, or only NEWOBJECT and the DEFINE needs to be in a prg? Sorry, Naomi, I need to bit more detail...

No, you can not use DEFINE in form's methods, only in prg. You May use Newobject of the class and the class definition in the same prg, though.

If you have DEFINE class in a prg, you can have NEWOBJECT/CREATEOBJECT in form's methods.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform