Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Init does not fire
Message
De
10/10/2007 11:39:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01259860
Message ID:
01260057
Vues:
20
>>>When you suspend, in the debugger put THIS into the watch window, then drill down its .Buttons array, or check .optionbutton3 (or whatever they may be called).
>>
>>Dragan -
>>Neat trick, thanks.
>>Following your suggestion shows that all 6 of the buttons are drived from the same class. So I would presume (SWAG) that the problem lies with the group container and not with the individual buttons. ???
>
>Strange. What is in the Init of the base class? Can you output something to make sure it doesn't indeed fire?

I have code like this in each of the 6 buttons
* button.init
messagebox("button 1 fires")
Obviously this is for testing only, but it shows me that only the first 2 buttons reach the init code. My ultimate purpose is to set the enabled property based on the users authorization but that's less visible than the messagebox. (not really but not as dramatic)
Also,
* baseclass.button.init
thisform.resizeobject(this)
if authlevel < this.authorization
	this.enabled = .F.
endif
dodefault()

* baseclass.buttongroup.init
thisform.resizeobject(this)
for each loButton in this.Buttons
thisform.resizeobject(loButton)
next
if authlevel < this.authorization
this.enabled = .F.
endif
dodefault()
Nothing really exotic.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform