Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to find dangling references?
Message
From
04/02/2008 13:16:49
 
 
To
04/02/2008 11:45:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01288201
Message ID:
01289163
Views:
24
>Thomas --
>
>You introduced some concepts here that are new to me ....
>
>I don't know how to use prg's instead of vcx's. Can I just hack the vcx to point to a class created in a prg instead of using a base class?

No.
>
>How would you go about switching between safe classes and "normal" classes when compiling? (In my environment, my apps get re-compiled regularly -- one, daily, most others about once a week -- this switching would have to be fool-proof, with me being the fool)

in prg and change by switch:
#define _DangleFind .t.
#if _DangleFind
Define class custom_base as custom_dangle [of ... vcx] && in your case to have one set of "dangling-fix" classes
enddefine
#else
Define class custom_base as custom
enddefine
#endif

define custom_dangle as custom
*-- Christoph's code
enddefine

if you are using only vcx-based stuff, in 1 vcx you define all your baseclasses from the vfp classes. With one
replace ParentClass with ParentClass + "_dangle", ClassLoc with "WhereeverTheLibIs"
you hook in the Daglingfinder
replace ParentClass with baseClass, ClassLoc with ""
you set back to vfp classes.

If you use Prg and vcx, in Prg

define baseclasses for all vfp classes into
\VfpBase\Baseclas.vcx
and Christoph's version into
\Dangfix\Baseclas.vcx

Define class custom_base_prg as custom_dangle of Baseclas.vcx
enddefine

and create your vcx classes from same Baseclas.vcx.

Then to switch just copy the claslib you need into the path you currently have and voila - the needed version is used.

If I was to short in my answer to make myself clear, don't hesitate to ask.

HTH

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform