Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add method programatically
Message
De
26/03/2001 08:40:10
 
 
À
26/03/2001 08:09:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00488347
Message ID:
00488530
Vues:
20
From the help file:
This method will only set the method text for <B>existing</B> methods.
If the object does not contain the method specified, Visual FoxPro generates an error.
Alan

>What's wrong with the Writemethod function? I've never used it but always assumed that was how you did it, am I missing something (or is it you? :-))
>
>Will
>
>>>Hi
>>>
>>>How can I add a method at design time programatically?
>>>It's for a builder
>>
>>No way. I'm fighting that one for four years, third version of Fox now. The only way is to add the code (including the PROCEDURE and ENDPROC lines) to the Methods memo of the .scx, add the proper line to the Reserved3 field, blank the ObjCode field, close the form (opened as a table) and compile it. Then you can reopen it. Not something you can do from a builder. Even VFP's converter from 2.6 forms doesn't build objects, it creates the .scx file as a table and does some crunching and munching with it.
>>
>>For details, you can download Alejandro Sosa's converter, recently updated, from the Files section, and see how does it work there. I didn't look at it recently, but I figure it still uses this technique.
>>
>>Alternate way would be to somehow instantiate the Edit property/method or New Method forms (accessible from the menu while editing form or a class), which I never succeeded.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform