PocketBuilder applications are event driven: users of the PocketBuilder applications you develop can control the flow of the applications by the actions they take. When a user taps a button, chooses an item from a menu, or enters data into a text box, an event is triggered. You write scripts that specify the processing that should happen when events are triggered.
For example, buttons have a Clicked event. You write a script for a button's Clicked event that specifies what happens when the user taps the button. Similarly, edit controls have a Modified event that is triggered each time the user changes a value in the control.
You write scripts in PocketBuilder using PowerScript, an object-oriented scripting language. You can type, drag and drop, or paste script in a Script view of the painter for the object you are working on. Scripts consist of PowerScript functions, expressions, and statements that perform actions or process data and text in response to an event.
The script for a button's Clicked event might retrieve and display information from the database; the script for an edit control's Modified event might evaluate the data and perform processing based on the data.
Scripts can also trigger events. For example, the script for a button’s Clicked event might open a new window, which triggers the Open event in that window.