SELF system handle
- Last Updated: October 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
A handle to the built-in object or widget whose event is being handled by the current trigger or event handler.
Syntax
|
- attribute
- An attribute of the built-in object or widget whose event is being handled by the current trigger or event handler.
Attributes
The specific attributes available depend on the type of the object or widget. You can determine the object or widget type by examining the SELF:TYPE attribute.
Example
The following example uses the SELF handle to display the starting and ending positions of an object you move:
r-self.p
|
Notes
- In user-interface triggers, SELF is not automatically the widget
that has input focus. To give input focus to the widget referenced by SELF, you
must apply the ENTRY event to SELF within the trigger block. Note that you must
do this for fill-in widgets whose AUTO-ZAP attribute you want to set, as in this
fragment:
DEFINE VARIABLE fname AS CHARACTER NO-UNDO FORMAT "x(30)" LABEL "Name". DEFINE FRAME FillFrame fname WITH SIDE-LABELS. ON ENTRY OF fname IN FRAME FillFrame DO: APPLY "ENTRY" TO SELF. SELF:AUTO-ZAP = TRUE. END.This makes SELF = FOCUS, which allows the new AUTO-ZAP value to take effect. For more information on the AUTO-ZAP attribute, see the Handle Attributes and Methods Reference.
- In the handler for a PROCEDURE-COMPLETE event, SELF returns the associated asynchronous request handle.
- In the event procedure of an ActiveX control, SELF returns the control-frame handle and the COM-SELF system handle returns the control-frame COM-HANDLE value.
- If referenced within a READ-RESPONSE event procedure or method then SELF is the socket handle associated with the connection that received the message.
See also
Asynchronous request object handle, COM-SELF system handle, FOCUS system handle, LAST-EVENT system handle