the selectedObject or selectedObject()
The selectedObject function returns the reference of the currently selected object, if any.
In edit mode, the selected object is identified by the dotted "marching ants". In Browse mode, the selected object is the field or dataSheet that contains the insertion point, or is empty if no insertion point is placed.
Do not confuse the selectedObject function with the selectedField function. The selectedField function returns the name of the field that contains the currently selected text. The selectedObject function returns the reference of the object selected in edit mode.
Place a field, a bitmap, or other random objects on a card. Create a button called "Select Object" and place the following handler into its script:
ask "Select which object?"
put it into theobject
do "select cd " & theobject
put the selectedObject into msg choose browse tool
Click on the button and enter "field 1" or "bitmap 1" or any other object on the card. The above example puts the reference of the selected object into the Message Box.
This text has been mechanically extracted from the Oracle Media Objects 220.127.116.11 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.