Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class defined in execscript() vanishes
Message
De
28/09/2007 14:24:09
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/09/2007 13:46:09
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
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:
01257507
Vues:
19
>Hi Dragan!
>
>Have you tried to pass a variable by reference, not by value to the script and place the object in this variable?
>Something like this:
>
>
>Local lcScript, loMyObject
>lcScript = "LParameters loMyObject" + Chr(13) + ;
>           "loMyObject = CreateObject('MyClass')" + Chr(13) + ;
>           "Return" + Chr(13)
>ExecScript(lcScript,@loMyObject)
>Return
>
The parameter was an object, and objects are always passed by reference. The (pseudo) code went like this:
lparameters toCaller
o=createobject("myclass")
toCaller.oProperty=o

define class myclass as myOtherClass of over\there\myOtherClasses.prg

procedure userhook()

enddefine
Anyway, I've already fixed it to copy the script out into a temp prg (on sys(2025)), and the caller is trying to delete it after this.oProperty=null in .unload(), but VFP doesn't close the file that early, so that errors out. I've unearthed some of my code from 2001 which purges the temp files older than three days - I can live with that, lot of software _never_ cleans up :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform