Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating class definitions on the fly
Message
From
10/05/2006 23:40:00
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01120742
Message ID:
01120884
Views:
13
>Hi everybody,
>
>My colleague came to an ingenious idea of creating class definitions on the fly in a program, setting procedure to this program and then running this code.
>
>It works fine in development, but doesn't work in exe.
>
>Here is his original code (well, with my cosmetic changes <g>)
>
>
>lcFile = GetTempFile("prg")
>=strtofile(m.lcRepText, m.lcfile)
>set procedure to (m.lcfile) additive
>
>Now, I think, the COMPILE piece is missing. The question is, if I add
>
>lcFile = GetTempFile("prg")
>=strtofile(m.lcRepText, m.lcfile)
>compile (m.lcFile)
>set procedure to (m.lcfile) additive
>
>
>Would it work? Or I should use set procedure to forceext(m.lcFile,'fxp')
>
>Thanks in advance.

Just to add, you shouldn't need the set procedure part if you'll instantiate your class as

oNew=newobject("myclass", m.lcfile)

back to same old

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

Click here to load this message in the networking platform