Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class defined in execscript() vanishes
Message
From
27/09/2007 20:41:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Class defined in execscript() vanishes
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01257351
Message ID:
01257351
Views:
62
I have a class defined in a .prg and compiled into an .app, which is then subclassed in a script. I'm creating an object of the parent class just in case, so it's in memory and visible by the subclass. So far so good - this part works.

When the script exits, the object is released. I tried to return the object from the script, and also tried to pass another object as a parameter and assign this new object to its property. Either way, this object vanishes when the script exits.

I assumed VFP would keep the .fxp of the script open as it always does with other .fxp files when they are in use. I could copy the script into a temp .prg file, compile it and run it from there (just like we did since VFP6sp3), but I keep getting this nagging feeling that I'm missing something obvious and that this can be as easy as I imagined it would be.

What am I missing?

(don't say money or any of those, I can do that myself :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform