Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add method programatically
Message
De
26/03/2001 00:00:19
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00488347
Message ID:
00488483
Vues:
17
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform