Kbase 15743: An Example of Implementing Pass-Through Links to SmartDialog
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
An Example of Implementing Pass-Through Links to SmartDialog
INTRODUCTION
============
This knowledgebase entry discusses how to link Smart Objects
in a SmartWindow to SmartObjects in a SmartDialog.
WHY YOU NEED TO KNOW THIS
=========================
Pass-though links between SmartWindows and SmartDialogs are
not supported because SmartDialogs are modal. For example,
it would not makes sense to have a SmartBrowse on a
SmartWindow linked to a SmartViewer in a SmartDialog because
the user would not be able to change the selected row in
the browse and see the results reflected on the viewer.
PROCEDURAL APPROACH
===================
It is possible to have a record link between object in a
SmartWindow and objects in a SmartDialog by establishing
the link within the SmartDialog. In the following example,
a SmartWindow contains a SmartBrowse for the customer table.
There is a view address button on the window which runs a
SmartDialog box that contains a SmartViewer with customer
address information.
The following needs to be done to accomplish the above:
1) The trigger code for choosing the button needs to
run the SmartDialog and pass the handle of the
SmartBrowser.
ON CHOOSE OF view-addr IN FRAME F-Main DO:
RUN d-cust.w (h_B-CUST).
END.
2) The SmartDialog needs to have an input parameter defined
for the handle of the SmartBrowser.
def input parameter h_source as handle.
3) Create a RECORD-LINK from the SmartDialog to the
SmartViewer.
4) Add the following code before the run dispatch in an adm
local-initialize procedure in the SmartDialog to dynamically
link the SmartBrowser to the SmartViewer.
RUN add-link IN adm-broker-hdl
(h_source, "Record":U, THIS-PROCEDURE).
When the view address button is chosen in the SmartWindow
the record in the SmartBrowser from the window is
the record that is displayed in the SmartViewer on the
SmartDialog.
REFERENCES TO WRITTEN DOCUMENTATION
===================================
Using PROGRESS V8
User Interface Builder Developer's Guide
Progress Software Technical Support Note # 15743