This scenario is part of Actions Example 11: Window with Separate Search Dialog.
To get a Reservations window that the user can query via the Find Existing Reservations dialog:
1. | Create a new subclass of the Reservations info box class, rename it to "ReservationsFindExisting". |
2. | Insert a new button and change the button prompt to "Find Existing ... ". |
3. | Open the Object Activator for the Action property of the button. |
4. | From the Windows Designer catalog, drag the "FindExistingReservations" dialog class into the Script box. This results in the following action statement being created: |
FindExistingReservations( ... ).Window.Create()
5. | In the Script box, select the parameter subnode of this call. |
6. | In the Object Browser pane, select the ReservationsFindExisting class itself (the top-level or root object in the tree). |
7. | Click the Set button. This results in: |
FindExistingReservations( Self() ).Window.Create()
| USoft replaces root-level objects by the keyword Self. The advantage of this is that the script remains legal even if the window class is renamed or embedded, or if subclass is made of it. |
8. | Click OK to close the Object Activator, and save your work. |
|