Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event Firing Sequence ... urg
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00189444
Message ID:
00189483
Vues:
14
>Briefly, I decided today that the solution to a problem I was having with one form calling another was to use a private data session in the called form. So today I'm learning about forms, data sessions, and dataenvironments. I hope.
>
>Here's something which surprised me:
>I created a form from VFP CREATE FORM command (i.e. it's not based on a subclass). I kept everything default except the form name, and added WAIT WINDOWs to all the Events to watch their firing sequence. I added one cursor to the data environment of the form, and put WAIT WINDOWS in all the events of the data environment and the cursor. I put a single button on the form, changed its caption to Close and its name to cmdClose, and added WAIT WINDOWs to all its events. Here's what surprised me. The event firing sequence at the start of the form went:
>Form.De.OpenTables
>Form.De.BeforeOpenTables
>Form.Load ... etc.
>
>Now how does it make sense to anyone that the BeforeOpenTables event fires after the OpenTables event??? Yes, I triple-checked my WAIT WINDOW commands, and I have the correct strings in the correct events.
>
>Help? ... glub ... blub ... blub ...
> (drowning in new VFP knowledge)

Pick up a copy of The Hacker's Guide to VFP 6, the authors did a tremendous job of documenting exactly what the relative firing sequences are (yes, DE.OpenTables fires first, but DE.BeforeOpenTables fires before it completes, prior to the first table actually being opened!)

It's worth every penny.

>
>Rich.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform