Information générale
Titre:
Private data-session SETtings
I want to modify my VFP application framework so that for every form with a private datasession (PDS) I don't have to keep repeating a call to all the SET (SET DATE BRITISH, SET TALK OFF, etc.) commands which are scoped to the current datasession.
At present I call a procedure PrivDataSet() in every form with a PDS (ie. most of them), but this means having to explicitly place the call in the BeforeOpenTables() event of the data environment. Unfortunately I cannot place the code once-only in my 'base form' parent class, because the DE (hence BeforeOptionTables()) is not available in a .vcx-based form subclass. The framework must work in VFP6 and 7, so unfortunately I cannot use the dataenvironment class that is new to VFP8.
At first sight, the baseform.load() event would be an ideal place for the DS-specific SETtings, but some commands (eg. SET EXCLUSIVE) have to be set before the tables are opened, ie. before the load event fires.
How can I get around this problem and have true inheritance with my PDS-limited SETtings?
I would be interested to hear how other developers get around this problem.
Many thanks,
Alan
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement