Previous Next

LIST-QUERY-ATTRS function
Returns a comma-separated list of attributes and methods that are supported for an object or widget.
Syntax 
 
LIST-QUERY-ATTRS ( handle )
handle
A handle to a valid object or widget. The function returns a list of the attributes and methods that are supported for that object or widget.
Example 
The following example uses the LIST-QUERY-ATTRS and LIST-SET-ATTRS functions to populate selection lists with the valid attributes and methods for a specified widget. When you run this procedure, type ? at any time to see lists of valid attributes for the widget that currently has focus.
 
DEFINE VARIABLE inv-price   NO-UNDO LIKE item.price.
DEFINE VARIABLE inv-value   NO-UNDO LIKE item.price.
DEFINE VARIABLE report-type AS INTEGER   NO-UNDO INITIAL 1.
DEFINE VARIABLE qattr-list  AS CHARACTER NO-UNDO LABEL "Readable"
  VIEW-AS SELECTION-LIST INNER-CHARS 20 INNER-LINES 5 
  SCROLLBAR-VERTICAL SORT.
DEFINE VARIABLE wattr-list  AS CHARACTER NO-UNDO LABEL "Writable"
  VIEW-AS SELECTION-LIST INNER-CHARS 20 INNER-LINES 5
  SCROLLBAR-VERTICAL SORT.
 
DEFINE BUTTON ok-butt LABEL "OK" AUTO-GO.
DEFINE BUTTON cancel-butt LABEL "CANCEL" AUTO-ENDKEY.
      
FORM
  inv-price LABEL "Price" AT ROW 1.25 COLUMN 2
  report-type LABEL "Report Sorted ..." AT ROW 2.25 COLUMN 2 
    VIEW-AS RADIO-SET RADIO-BUTTONS 
    "By Catalog Page", 1, "By Inventory Value", 2 SKIP
  ok-butt cancel-butt
  WITH FRAME select-frame SIDE-LABELS.
 
FORM qattr-list wattr-list
  WITH FRAME list-frame TITLE "Attributes" WIDTH 30 COLUMN 47.
 
ON ? ANYWHERE DO:
  FRAME list-frame:TITLE = "Attributes for " + FOCUS:TYPE. 
  qattr-list:LIST-ITEMS IN FRAME list-frame = LIST-QUERY-ATTRS(FOCUS).
  wattr-list:LIST-ITEMS IN FRAME list-frame = LIST-SET-ATTRS(FOCUS).
  ENABLE qattr-list wattr-list WITH FRAME list-frame.
  RETURN NO-APPLY.  
END.
 
ENABLE ALL WITH FRAME select-frame.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.
See also 
CAN-QUERY function, CAN-SET function, LAST-EVENT system handle, LIST-EVENTS function, LIST-SET-ATTRS function, LIST-WIDGETS function, VALID-EVENT function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.