PreviousNextIndex

CAN-QUERY function

Returns a logical value indicating whether you can query a specified attribute or method for a specified widget.

Syntax

CAN-QUERY ( handle , attribute-name ) 

handle
attribute-name
Example

The following example prompts for a widget type and an attribute. It creates a widget of the specified type and passes a handle to that widget and the attribute you specified to the CAN-QUERY and CAN-SET functions. Then it reports whether the attribute can be queried or set for that widget.

r-prog.p
DEFINE VARIABLE attribute   AS CHARACTER NO-UNDO FORMAT "x(24)"  
  LABEL "Attribute". 
DEFINE VARIABLE queryable   AS LOGICAL   NO-UNDO VIEW-AS TOGGLE-BOX  
  LABEL "Query". 
DEFINE VARIABLE setable     AS LOGICAL   NO-UNDO VIEW-AS TOGGLE-BOX  
  LABEL "Set". 
DEFINE VARIABLE temp-handle AS HANDLE    NO-UNDO. 
DEFINE VARIABLE widget-type AS CHARACTER NO-UNDO FORMAT "x(24)"  
  LABEL "Widget". 
FORM widget-type attribute setable queryable. 
REPEAT: 
  UPDATE widget-type attribute. 
  CREATE VALUE(widget-type) temp-handle. 
  queryable = CAN-QUERY(temp-handle, attribute). 
  setable   = CAN-SET(temp-handle, attribute). 
  DISPLAY queryable setable. 
  DELETE WIDGET temp-handle. 
END. 

Note

For SpeedScript, use with buffer-field, buffer-object, buffer, and query-object handles.

See also

CAN-SET function, LIST-QUERY-ATTRS function, LIST-SET-ATTRS function


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex