>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.
Previous
Next
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