Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Init does not fire
Message
 
 
To
10/10/2007 11:39:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01259860
Message ID:
01260061
Views:
17
>>>>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.

Ok, I don't see why they would not fire. Can you try to remove them and re-add again?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform