General information
Category:
Coding, syntax & commands
When I have controls that depend on other controls, such as combo boxes whose contents depend on values from another combo box, etc., an approach I often use is to have a property lInited at the form level that I set as part of the form INIT. I check in the control INIT or other method that may fire during control instantiation for thisform.lInited and if .F., not run code that will fail if the dependent control hasn't INITed yet. An example might be a control that loads with data and has an InteractiveChange event that does something to another control that might not have instantiated yet.
In my custom after_init method or just later in the form INIT, I'll sequence through the desired controls and call the methods that could have failed during instantiation to finish loading data, etc.
Gary
>Is it possible to force Foxpro to instantiate the objects on a form in a specific order? If so, how?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only