Modal Forms

The Form class showModal method blocks execution of code until the form is unloaded, so actions cannot be replayed on a modal form.

To handle this, a handleShowModal method is generated in the profile class. It calls the Form class show method rather than the Form class showModal method. Profile methods can then be replayed as normal. At the end of the handleShowModal method, the value that was captured at recording time is returned.

To support this, you must reimplement the Form class showModal method to call the handleShowModal method. If the application has reimplemented this in its common superclass, you can change that reimplementation.

Nested modal forms are supported.

There are several parsing tokens specifically for modal forms. It is necessary to strictly separate the code that is generated for action on the modal form versus that for the other forms; for example, a single reference to the modal form after it is closed generates an exception.