Advanced PowerBuilder
Exercises
Please complete the following exercises. We advise you not to download the solutions till the completion of exercises.
- We wrote script in the clicked event of each menu item under Module option to invoke the respective window as a sheet. As you might have observed, we have few lines of code that are repeated in these events. What we like you to do is, write a generic function for the menu object to instantiate the given window and display it in the menu's parent window, i.e., mdi frame window. Once the function is ready, change the script of all menu items (menu items under Module option) clicked events to call this function with appropriate window name.
- Similarly, we wrote script to the clicked events for other menu items such as Save, Sort, etc.. What we did was to fire appropriate event in the active sheet. What we like you to do is to channel this functionality as you did in the first exercise.