Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event Firing Sequence ... urg
Message
De
19/02/1999 15:31:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00189444
Message ID:
00189468
Vues:
19
>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)
>
>Rich.

I was reading through the VFP 3.0 hacker's guide and they say something to the effect that " the BeforeOpenTables" is misnamed. Is should be called the "BeforeAutoOpenTables" because this fires right before tables are opened automatically." They go on to say this makes the "BeforeOpenTables" pretty useless. You might as well put what code you want in the OpenTables method.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform