Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent class inside exe, subclass in subfolder
Message
From
30/10/2018 14:36:56
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
30/10/2018 04:49:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01662676
Message ID:
01662964
Views:
79
>>So the current solution with the two initial pieces staying welded inside the exe (caller grid, the form) and everything else (classlib, prgs with bizobjects, couple of small readonly dbfs) in the subfolder is the usable solution.

Our interfaces have prg classes inside the exe with localization in a prg outside the exe. The localizer prg contains a subclass definition and a single line to create an instance of that class.

Simplifying and removing status/error trapping etc, the subclassed/localized object is created by
loLocalizer="" && variable left in scope for...

do outsidelocalizer.fxp

if vartype(loLocalizer) !="O"
	loLocalizer=create("localizerbase")
endif
...
...
Define class localizerbase as custom
...
...
and in outsidelocalizer.prg:
loLocalizer=CREATEOBJECT("customLocalizer")
RETURN

DEFINE CLASS customLocalizer as localizerbase
...
...
That definitely works. So it might be worth moving the key class into a prg via classbrowser or whatever, then distribute your add-on fxp.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform