Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Init event firing twice
Message
From
12/10/2000 16:07:38
Ahmad Nawaz
Mammography Reporting System, Inc.
Seattle, Washington, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Init event firing twice
Miscellaneous
Thread ID:
00428745
Message ID:
00428745
Views:
48
I have a class named Hormones which has a number of labels and textboxes, and I am adding an object of this class in a container by using the following command

.AddObject(“oHormones”,”Hormones”)

When I use event tracking to see the events I have observed that Init of each control in Hormones is being triggered twice. Here is a portion of the snapshot of event tracking list.

patientform1.datacontainer.oinsidecontainer.hormones.lblhcont.Init()
patientform1.datacontainer.oinsidecontainer.hormones.lblestr.Init()
patientform1.datacontainer.oinsidecontainer.hormones.lblprog.Init()

patientform1.datacontainer.oinsidecontainer.ohormones.lblhcont.Init()
patientform1.datacontainer.oinsidecontainer.ohormones.lblestr.Init()
patientform1.datacontainer.oinsidecontainer.ohormones.lblprog.Init()

patientform1.datacontainer.oinsidecontainer.ohormones.Init()
patientform1.datacontainer.oinsidecontainer.ohormones.Resize()

The only difference is that Init of oHormones is triggered as compared to init in hormones.

I verify by using wait wind with a random number in the init of hormones.lblhcont and it only appears once where I would expect to appear for both homones.lblhcont and ohormones.lblhcont.

Also to compare the results I have created a new class outside of my project and added it to a form. In that case the Init of each control is only triggered once.

Ahmad
Reply
Map
View

Click here to load this message in the networking platform