Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VMP Security Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00470602
Message ID:
00470752
Vues:
25
I put the following code in my ctrxxapp.logout() method. Is this alright to do? Any forseeable pitfalls I might encounter doing this?
local lnCount

if this.yBeforeLogout()
	** pea 01/31/2001
	** First delete all toolbars. The default behavior in dodefault is to hide all toolbars and 
	** then when someone logs back in to show the toolbars. The problem with this is that I want
	** to put security on some of the options of the toolbar. In order to do this the toolbar must
	** be recreated because the security is checked in the init of each control.
	for lnCount = 1 to alen(this.iaGlobalToolbars,1)
  		if type("this.iaGlobalToolbars[lnCount,1]") = "C" and !isnull(this.iaGlobalToolbars[lnCount,1]) and !empty(this.iaGlobalToolbars[lnCount,1])
	    	oToolbars.DeleteInstance(this.iaGlobalToolbars[lnCount,1])
		endif
	endfor

	dodefault()

	** pea 01/31/2001
	** Then recreate the toolbars so that the different conrols' inits will fire and then check
	** security. 
	for lnCount = 1 to alen(this.iaGlobalToolbars,1)
		if type("this.iaGlobalToolbars[lnCount,1]") = "C" and !isnull(this.iaGlobalToolbars[lnCount,1]) and !empty(this.iaGlobalToolbars[lnCount,1])
	    	oToolbars.DoToolbar(this.iaGlobalToolbars[lnCount,1],.t.,this.iaGlobalToolbars[lnCount,2])
		endif
	endfor
else
	nodefault
endif
Thanks,
Paul
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform