Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActivePage and the name of the page
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
ActivePage and the name of the page
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01038581
Message ID:
01038581
Vues:
62
Hi everybody,

I know the ActivePage in run-time. Based on this information, how can I find the name of the page?

We had the following code:
LOCAL loForm, lnCurrentPage

lnCurrentPage = THISFORM.pgPatient.ACTIVEPAGE

DO CASE
*----------------------------------------------------------------
* Patient Page
*----------------------------------------------------------------
*!*		CASE lnCurrentPage =  THISFORM.pgPatient.page1.PAGEORDER

*!*			WITH THISFORM.pgPatient.page1.cntPatient
*!*				.PatientEmployersBizobj1.REQUERY()
*!*				.SetButtons() && Reset Buttons
*!*			ENDWITH
*----------------------------------------------------------------
* Guarantor Page
*----------------------------------------------------------------
	CASE lnCurrentPage =  THISFORM.pgPatient.page2.PAGEORDER
        
		THISFORM.pgPatient.page2.cntGuarantor.SetGuarantorControls(.f.) && Disable Guarantor controls
ENDCASE
		
*-----------------------------------------------------------------
*-- If the  queue management form needs to be updated, then we
*-- do it from here. The actual row of data that gets written
*-- into the activity table is done from the trans_resolution object.
*-----------------------------------------------------------------
IF THISFORM.lRequeryQueueMgt
&& ***** Name of the form has to include No "1" otherwise won't work *****
*   loForm = goApp.oForms.GET('frmInvestigatorQueueMgt1', 'Name')
*   IF VARTYPE(loForm) = "O"
   loForm = thisform.oCallingForm
   IF VARTYPE(loForm) = "O" AND UPPER(loForm.Class) = UPPER('frmInvestigatorQueueMgt')
		loForm.oBizobj.lResolved = .T.
		loForm.oBizobj.cTrans_pk = THISFORM.cTrans_pk
		loForm.oBizobj.PostRequeryHook()
		loForm.RefreshTotals()
		loForm.REFRESH()
	ENDIF
	THISFORM.lRequeryQueueMgt = .F. && Reset the flag
ENDIF

DODEFAULT()
and it just stroke me, that the code will fail if we remove some pages, say, page2.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform