Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My BeforeNew() method is ignored
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
My BeforeNew() method is ignored
Divers
Thread ID:
00560113
Message ID:
00560113
Vues:
54
I've the following hierarchy of form classes:

cBizObjForm (cForms.vcx)
...|
...+->iBizObjForm (iForms.vcx)
.........|
.........+->SBTBizObjForm (SBTForms.vcx)
...............|
...............+->aUserMaintForm (aForms.vcx)

Each of these clases have a user defined method called BeforeNew() whose function is serve as a pre-hook to the creation of a new record in the data environment. I've specified the BeforeNew() method in SBTBizObjForm as:

LOCAL llResult
llResult = DODEFAULT()
IF llResult
...THIS.SetEditState(clTRUE)
ENDIF
RETURN llResult

The problem stands on the fact that I can't get the BeforeNew() method to be executed. I traced the program execution with the debugger but when it arrives to cBizObjForm::New() it ignores the call to THIS.BeforNew() as if it were empty.

The portion of code I'm talking about follows:

* Method: cBizObjForm::New()
IF !This.BeforeNew()
...RETURN FILE_CANCEL
ENDIF

LOCAL lnRetVal
This.LockScreen = .T.
lnRetVal = FILE_OK
...
RETURN lnRetVal


Any clue of what I'm overlooking? Please?

Thank you for your patience

Gustavo.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform