Finding events

PowerBuilder events in descendent objects are, by default, extensions of ancestor events. PowerBuilder searches for events in the object’s ancestor hierarchy until it gets to the top ancestor or finds an event that overrides its ancestor. Then it begins executing the events, from the ancestor event down to the descendent event.

Finding functions versus events

The following illustration shows the difference between searching for events and searching for functions:

The illustration shows a hierarchy that flows down from the Ancestor Object to first and second level descendants and finally to an n level descendant. Events are shown to search upward through this hierarchy to the ancestor or to an event with an override setting, and to execute each event from the ancestor or override down through the descendants. Functions are shown to search upward from the n level descendant toward the ancestor and to execute the first matching function.