Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class defined in execscript() vanishes
Message
De
30/09/2007 12:48:16
 
 
À
30/09/2007 11:10:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01257351
Message ID:
01257634
Vues:
20
>>>This is (so far) just a post-processing thing with some code in the hook methods - it's supposed to fill the gaps that the standard (i.e. parent) class doesn't fill, because the user chose to enter their data in a specific way. So the standard code will run first, then the subclass's PostWhateverHook() methods will.
>>
>>Here I'ld probably also keep code in a table and work a
>>procedure PostWhateverHook()
>>  return MyDynamicallyCreatedFunction(this, thisform, program())
>>endproc
- such a simple half-OOP aproach gets you quite far, as you can access the calling object via toObject.MyInterestingProperty. But that look better to me especially as I am not too keen either on housekeeping or leaving a mess behind<g>.
>
>Nice, but wouldn't work in my case - I need an object reference to stay there as long as I need it, which is until the caller form exits. The code in the class may be run any number of times, and is pretty much the reason for the existence of the form: it compiles data from other tables; the form is there for the user to see and maybe correct the results.
>
>Anyway, what I have now works, and housekeeping is about ten lines, which I wrote in 2001 and just dug out :).

Good for you - a lot of days I am working with scripts more or less created for the task at hand. Most of the OOP theories assume a fixed, clear model to be gained by analysis - I have to build something and can reuse, copy and subclass an existing structure already too unwieldy for a total rewrite starting from zero. Definately not the things on advertising material on how to develop software<bg>. So I am looking for other approaches leading to less rewrite / even sometimes refactoring of things in different sub branches. Perhaps using a wrapper and a facade will enable me to hoist it to an approach build on a dozen of communicating service objects. But working in such "shady" areas gives a lot of thought-food on how to build an SQL scripting datamining layer and flexible OOP approaches in general and how to mix in the ideosyncracies of our favorite tool<g>.

Hope you also have some fun building things in your work area...

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform