Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu disabled after modal forms released
Message
From
01/07/2020 16:12:11
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Menu disabled after modal forms released
Miscellaneous
Thread ID:
01675077
Message ID:
01675077
Views:
175
Running into a nasty problem in a complex application. Hoping someone here can put me on the right track.

Clicking a button on Form A opens Form B, which is modal. Form B contains several instances of a container class I've built to allow look-ups (which I'll generically call "the look-up control"). Under a couple of different circumstances, it opens another modal form, which contains only an instance of the Locator Grid class from FoxyClasses, as a picklist. We're using the look-up class that calls the picklist all over the place in this application, and while I'm still tweaking it, it generally works as we want. (That said, because this application is a conversion from FPW, where we're trying to reuse as much of the FPW code as possible, I have dozens of hours into customizing the Locator Grid and building this picklist.)

In this particular case, where Form A calls Form B and then the picklist is called, something's going wrong. After Form B is closed, items on the menu remain disabled as if there were still a modal form open. If I simply type the desired value into the look-up control, so the picklist doesn't open, this doesn't happen. I've tested with two different look-up controls on this form, and popping up the picklist for either one causes the problem.

While there aren't a lot of modal forms that include the look-up control in this application, I checked a couple of others and couldn't replicate. So it feels like it has to be something about this particular combination of Form B and the picklist, but Form B is based on the same form class as the other modal forms I tested.

There is one difference I can think of, but I can't see how it matters. This application uses the view mode/edit mode distinction. Form A is actually in view mode when Form B is called, and Form B automatically opens in edit mode. In the other cases I could find, either the calling modeless form has to be in edit mode for the modal form to open in edit mode, or making changes in the modal form switches the calling modeless form into edit mode because data has been changed and must be saved. In the problem case, the data edited in Form B (the modal form) is stored in a different table than the main table for Form A and so Form A is not switched to edit mode.

I have a vague memory of reading about issues involving modal forms calling modal forms, but that much is all I remember. Anybody got any ideas?

Tamar
Next
Reply
Map
View

Click here to load this message in the networking platform