Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add method programatically
Message
From
26/03/2001 08:09:51
 
 
To
26/03/2001 00:00:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00488347
Message ID:
00488521
Views:
14
Dragan,

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.
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform