Concepts - Actions Example 12: Generic Search Dialog - Reservations Window

Previous Next

See Also

This scenario is part of Actions Example 12: Generic Search Dialog.

To get a Reservations window that the user can query via the SearchDialog:

1. Create a new subclass of the Reservations info box class, rename it to "ReservationsFindExisting".


Adapt the "ReservationFindExisting" (Example 11) into this newly defined Reservations sub class.

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 "SearchDialog" dialog class into the Script box. This results in the following method call being created:


5. For the first parameter subnode, select the ReservationsFindExisting class itself (the top-level or root object in the tree) and click Set. For the second, select the query.destination and click Set. For the third, select the query.family_name and click Set. These result in:

SearchDialog( Self(), query.destination(), query.family_name() ) Window.Create()

USoft replaces root-level objects by the keyword Self. The advantage of this is that the script remains valid even if the window class is renamed or embedded, or if subclass is made of it.

6. Click Apply and OK to save your work and close the Object Activator.