Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ExecScript + ThisForm
Message
From
09/06/2003 12:56:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00797642
Message ID:
00798021
Views:
28
>Hi Cetin,
>
>If a program needs to refer to thisform then I send it thisform as a parameter.
>But as per Execscript why do you filetostr() and execscript.
>Do relatorio with thisform
>Is a more direct and reliable way and faster than Execscript (doesn't recompile).
>It gets it as a toForm parameter and report could also use toForm.

>
>I use ExecScript because it is a particular routine and I use it in just one client.
>
>Le me explain better...
>
>I have an application that is used for some companies... And one of these companies ask me a little change, but I don't like to change my original app... So, I do something like that:
>
>If File("SPECIALROUTINE.PRG")
>   ExecScript(FileToStr("SPECIALROUTINE.PRG"))
>Else
>   Report Form MyReport To Printer NoConsole
>EndIf
>
>
>and then, in this specific client, I put some code in SPECIALROUTINE.PRG... ;-)
>
>[]s!

Rodolfo,
Addition to previous message why I insists on 'do' :)
ExecScript compiles each time it's called (internally it's :
copy code to a temp file
compile and execute)
With 'do' you might either directly send .fxp to client or compile once there.
I did similar thing with ExecScript and ended with DO version (especially if sending parameters).
You can still use StrToFile(lcPrg,'SpecialFunc.prg') if you're storing them in a table or something like that (would directly store compiled versions there).
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