Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add my code in vfp method
Message
From
18/05/2002 13:22:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/05/2002 05:38:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00658533
Message ID:
00658591
Views:
28
>How to use "Writemethod"?Could u give a sample?it's used in design mode only! But I want to write the method in run mode,who can help me? thxk

Lu,
As documents say it's for designtime only and typically used by builders.
If you have VFP6 SP3 or later you can write code at run time in a different way :

*CodeRunner - custom method written at design time
lparameters tcMethodCode, tcParamStr
local lcFile
lcFile=sys(2015)
StrToFile(tcMethodCode, lcFile)
compile (lcFile)
luRetValue = &lcFile.(&tcParamStr.)
erase (lcFile+'.*')
return luRetValue

Also if it's needed you could compile other things like class, form etc (check help on compile).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform