Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
6.1.2 BizObj Initialization Questions
Message
De
27/11/2001 11:14:54
Gil Munk
The Scarborough Group, Inc.
Baltimore, Maryland, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
6.1.2 BizObj Initialization Questions
Divers
Thread ID:
00586371
Message ID:
00586371
Vues:
70
I usually send the primary bizobj to back last so it's at the top of the list of multiple business objects (the sesson obj is always furthest back btw) and on most maint. forms the primary is loaded with data upon instantiation. Such is the case with an invoicing form.
With 6.1.2 the init calls AutoRequery() which calls Requery() which calls OnMoveRecordPointer() which calls PostMoveRecordPointerHook()

This new call to the new method AutoRequery() now results in attempts to requery children bizobj's of the Primary Bizobj. These Children are not yet instantiated. What's more, my Primary BizObj's PostMoveRecordPointerHook refreshes the child grid (on page 1 too) but the grids are not yet instantiated.

This requerying the bizobj during the init whose NoDataOnLoad property = .F. is new. I don't understand why we're doing this now; the view is already loaded with data and yet we're requerying it.
Not only that but the requery() calls OnMoveRecordPointer(). Version 6.0b did not assume the record pointer had move at init.

During the AutoRequery the variable lcAlias is set, then the test of the requerytype and for the InitialSelectedAlias:

lcAlias = loDataAccess.GetAlias()
*---------------------------------------------------------------
*--- Don't issue a requery if the business object's nRequeryType
*--- is set to 4 and this is the InitialSelectedAlias
*---------------------------------------------------------------
IF NOT (This.nRequeryType = 4 AND LOWER(lcAlias) == LOWER(lcAlias))

Shouldn't the test be 'LOWER(lcAlias) == LOWER(lcInitialSelectedAlias)' ?
Yet lcInitialSelectedAlias is set to lcAlias when both are '.F.'

And nRequeryType 4 means to requery on init. nRequeryType 0 means do not autorequery... What am I missing here?

My Primary bizobj's properties are:
.nRequeryType = 0
.cCursorType = 'VIEW'
.lAutoOpenTable = .T.
.NoDataOnLoad = .F.
Gil Munk


"If a nation expects to be ignorant and free, it expects what never was and never will be." - Thomas Jefferson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform