Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent class inside exe, subclass in subfolder
Message
De
30/10/2018 14:36:56
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
30/10/2018 04:49:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Database:
MS SQL Server
Divers
Thread ID:
01662676
Message ID:
01662964
Vues:
80
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform