Events for the OLE control
There are several events that let PowerBuilder know when actions
take place in the server application that affect the OLE object.
Events for data
Events that have to do with data are:
-
DataChange
The data has been changed
-
Rename
The object has been renamed
-
Save, SaveObject
The data has been saved
-
ViewChange
The user has changed the view of the data
When these events occur, the changes are reflected automatically
in the control. If you need to perform additional processing when
the object is renamed, saved, or changed, you can write the appropriate
scripts.
Because of the architecture of OLE, you often cannot interact
with the OLE object within these events. Trying to do so can generate
a runtime error. A common workaround is to use the PostEvent function
to post the event to an asynchronous event handler. You do not need
to post the SaveObject event, which is useful if you want to save
the data in the object to a file whenever the server application
saves the object.
Events for properties
If the server supports property notifications, then when values
for properties of the server change, the PropertyRequestEdit and
PropertyChanged events will occur. You can write scripts that cancel
changes, save old values, or read new values.
For more information about property notification,
see “Creating hot links”.