>... as an aside, Drew Speedie had an interesting article in the March edition of FPA about Form instantiation and how to remember the order of form methods firing sequence. Her name is LISA G. Load...Init...Show...Activate...GotFocus
That's cute, but surprisingly incomplete for something Drew would do. Even more incomplete than the VFP help topic on Event Firing Sequence!
Besides the list leaving out some significant events, it doesn't account for the fact that, during Form, DataEnvironment, and Form's Objects instantiation the events for all of them get somewhat intermingled.
Here's the complete lists of events which fired for my form with one cursor in the data environment and one button on the form.
Form.DE.OpenTables
Form.DE.BeforeOpenTables
Form.Load
Form.DE.Cursor.Init
Form.DE.Init
Form.Button.Init
Form.Init
Form.Show
Form.Paint (twice)
OK, maybe this doesn't count, you never put code thereForm.Refresh
Form.Button.Refresh
Form.Button.When
Form.GotFocus
Form.Button.GotFocus
Form.Paint
Now the button has focus and we're at a "wait state".Form.Button.KeyPress
if I press space instead of mouse-clicking on itForm.Button.Click
Form.Release
Form.Button.Valid
really surprised me that Button.Valid
fired hereForm.Button.When
really really surprised me that When
fired here!Form.Destroy
Form.Button.Destroy
Form.Paint
Form.DE.CloseTables
Form.DE.AfterCloseTables
Form.DE.Destroy
Form.DE.Cursor.Destroy
Now the form is gone from screen and memory.Cheers,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing