| Home | Previous Lesson: Scripts Next Lesson: Extending Ancestor Script |
When you invoke the Script Painter for a descendent window, PowerBuilder doesn't display the ancestor script. For example, if you open a new window and inherit from w_about window in the example application (PBEXAMFE.PBL), you won't be able to see script for the open event. However, you will see a colored script icon beside the event, indicating that there is script in the ancestor window.
To see the script for the ancestor window, you need display popup menu in the script painter and select 'Go To > Ancestor Event' menu option. You are not allowed to edit an ancestor script from the descendant, but needed, you can copy and paste the script to and from the clipboard and then edit it. To come back to the current object's script, select 'Go To > Descendent Event' menu option.
There is an easy of viewing ancestor script up to any level without going so many menu options. Just click on the right most DropDownListBox in the script painter and select the ancestor object you want to see the script. PowerBuilder lists objects in that DDLB in the reverse inheritance hierarchical order. The grand parent on the bottom and it's descendent on top of it and so on. The following diagram displays the same for a window inherited from PFC w_sheet window.
| Home | Previous Lesson: Scripts Next Lesson: Extending Ancestor Script |