Progress
ADM 2 Reference


linkHandles (smart.p)

Takes a link name and returns a list of handles of objects at the other end of that link, relative to the TARGET–PROCEDURE.

Parameters:

INPUT pcLink AS CHARACTER

The link name (including -SOURCE or -TARGET).

Returns: CHARACTER (Comma-separated list of handles to the SmartObject procedures at the other end of the link.)

Notes:

Examples:

/*  
** Here, a pass-through link is created from a SmartDataObject in a parent 
** SmartWindow, through the SmartWindow containing this code, to a  
** SmartDataBrowser contained in this window. The Data link from the SDO will  
** go both to the SmartWindow and to the Browser. There is no standard  
** implementation of the ‘dataAvailable’ event that is published whenever a  
** new row is selected in the parent SDO, but this local version will intercept  
** that event and use it to modify the title of the window.  
*/ 
PROCEDURE dataAvailable: 
  /* This input parameter is defined but we don’t look at it. */ 
  DEFINE INPUT PARAMETER cType AS CHARACTER NO-UNDO. 
  DEFINE VARIABLE hDataSource AS HANDLE NO-UNDO. 
  DEFINE VARIABLE cValues     AS CHAR   NO-UNDO. 
  DEFINE VARIABLE hWindow     AS HANDLE NO-UNDO. 
  /* We can convert the return value directly to a handle because we know 
     there is only one 
Data Source. */ 
hDataSource = WIDGET-HANDLE(dynamic-function(‘linkHandles’:U, 
‘Data-Source’:U)). 
  /* Ask for the Customer Name field from a Customer SDO. */ 
   cValues = dynamic-function(‘colValues’:U IN hDataSource, INPUT 
    ‘Name’:U). 
   /* Get the widget handle of the window itself. */ 
   hWindow = dynamic-function(‘getContainerHandle’:U). 
   /* First value returned from colValues is always the RowIdent, so 
      skip it. */ 
  hWindow:TITLE = “Orders for Customer “ + ENTRY(2, cValues, CHR(1)). 
END PROCEDURE. 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095