Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many CASEs in DO CASE?
Message
From
02/06/2006 05:09:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01126584
Message ID:
01126687
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
>>
>>So I think you couldn't bother about this, but I am veeeery lazy too and I think programing 100 CASEs is more complicated and difficult to maintain then EXECSCRIPT(SomeField) ...
>
>I tried you suggestion with EXECSCRIPT and it does seem to be very easy and practical. And I can include the .DBF where I store the code inside the application file so customer cannot meddle with it.
>
>Thank you very much for your help.

Dmitry,
ExecScript is easy but however it is slow and problematic at runtime (it's compiled with each call and if you need referencing other project elements -like a form,class antoher prg etc- then execscript cannot see them).
For a similar necessity (sounds similar to me) what I did was to create a "dispatcher" code. What that code does is to call required proc/form with given parameters. A table which is included in exe holds proc/function calls as strings. ie:

ActionID#1,doForm("myForm",myParameters)
ActionID#2,libProcedure("myProcedure",myParameters)

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