When the new form opens it will look like this:
The Form is missing the settings for the Design and Functionality.
We could have this done already inside PowerBuilder when we have created the Form but it would be a cumbersome.
These Settings can be done at runtime with be.as.
be.as will take care about the whole administration.
Now we need to call the Editor.
Here a short excerpt of Keyboard Short Cuts:
Strg+N+B |
Main Definitions |
Strg+N+G |
Global Functions |
Strg+N+N + Mouse click on an Object |
Definition of a Field |
Now us the Short Cut Strg+N+B to open the Main Definition Form and enter all the necessary Data.
•Programmbereich: -> System
•Für dieses Fenster: -> The Type of the form. In our Case "Browser (Liste) ohne Eingabe"
•Titel: -> The Title. With <spr...> you have it also set to Multi Language.
•Name: -> Name of the psr file but without the ".psr"
•Fensterkoordinaten: -> Coordinates of the Form. Please use "Automatisch"
Now define the Buttons we need:
•New -> New
•Delete -> Delete
•Edit -> Edit
•Print -> Print
•Eingabefeld -> Input Field
To do this , just click the right Checkbox's on the right side of the Form.
The be.as Engine will generate the script for you.
If you want to delete or change the script then you have to to it manually.
Now close the editor and the form and call the form again over the menu entry.
The Design should look like this:
Now we still need to generate the Form which can modify the data because our first form just shows the data.
Remember, I have told you already that we could have done these settings already in PowerBuilder ?
Well that is how be.as is doing it.
It saves theses settings into hidden fields in the form description (called DataWindow in PowerBuilder)
We use Text fields for data storage Since PowerBuilder natively wasn't designed for this.
These Text fields are hidden in the Footer area of the form description.
You can open the PSR file again in PowerBuilder and you will see these fields.
You will probably find:
•t_mast
•t_init
•Master-Init
These fields contain be.as-Script.
Remarks:
The Field t_master will be called when the Form will be opened.
The Field t_init will be called when the Form is opened but not showing.