About PocketBuilder applications

What’s in a PocketBuilder application?

A PocketBuilder client application contains:

PocketBuilder applications are event driven

In a client application, users control what happens by the actions they take. For example, when a user clicks a button, chooses an item from a menu, or enters data into a text box, one or more events are triggered. You write scripts that specify the processing that should happen when events are triggered.

Windows, controls, and other application components you create with PocketBuilder each have a set of predefined events. For example, each button has a Clicked event associated with it and each text box has a Modified event. Most of the time, the predefined events are all you need. However, in some situations, you may want to define your own events.

PowerScript language

You write scripts using PowerScript, the PocketBuilder language. Scripts consist of PowerScript commands, functions, and statements that perform processing in response to an event.

For example, the script for a button’s Clicked event might retrieve and display information from the database; the script for a text box’s Modified event might evaluate the data and perform processing based on the data.

The execution of an event script can also cause other events to be triggered. For example, the script for a Clicked event in a button might open another window, triggering the Open event in that window.

PowerScript functions

PowerScript provides a rich assortment of built-in functions that can act on the various components of your application. For example, there is a function to open a window, a function to close a window, a function to enable a button, a function to update the database, and so on.

PocketBuilder has system functions to control the display of the Soft Input Panel (SIP) on a Pocket PC device or emulator, and window events that respond to changes in the SIP display. The SipUp and SipDown window events occur when the SIP is opened and closed, respectively.

You can also build your own functions to define processing unique to your application.

Object-oriented programming with PocketBuilder

Each menu or window you create with PocketBuilder is a self-contained module called an object. The basic building blocks of a PocketBuilder application are the objects you create. Each object contains the particular characteristics and behaviors (properties, events, and functions) that are appropriate to it. By taking advantage of object-oriented programming techniques such as encapsulation, inheritance, and polymorphism, you can get the most out of each object you create, making your work more reusable, extensible, and powerful.

Window object size

The default window object size is smaller in PocketBuilder than in PowerBuilder, since it is tailored to the size of a Pocket PC screen. Main windows in PocketBuilder applications are also automatically resized to fit the device where they are deployed, and are automatically reoriented if the window layout settings on the device are changed. Main and response windows are currently the only window types available for PocketBuilder applications.

Database connectivity

PocketBuilder provides easy access to information stored in Sybase SQL Anywhere and UltraLite databases. The ODBC database driver for SQL Anywhere is installed with PocketBuilder, as well as a native driver for UltraLite. If you need to access an enterprise database from a PocketBuilder application, you can use MobiLink synchronization technology or convert the enterprise database to a SQL Anywhere database.

Deployment options

For a PocketBuilder project, you must select one of the following deployment options for each project:

An application that you deploy to the desktop looks slightly different from the same application deployed to a handheld device or emulator. The desktop application has its own title bar with a maximize, minimize, and close button. Even if you select Close or SmartMinimize icons for a window, these do not display in the window when it is run or debugged on the desktop. Desktop deployment is for testing and demonstration purposes only.

Using the Windows CE Start Menu By default, PocketBuilder applications are deployed to the \Program Files directory of a Pocket PC device or emulator and to the \Storage\Program Files directory on a Smartphone device or emulator, but you can change the deployment directory in the Project painter. On a Pocket PC device, users can run the PocketBuilder applications you deploy by tapping on an application executable file in the directory where it is deployed. (You can also select a Project painter option to launch the application immediately upon deployment.)

Users can take advantage of the built-in PocketBuilder application list utility as a selection vehicle for deployed applications. However, you can also select a Project painter option to deploy an application shortcut to the \Windows\Start Menu\Programs directory on the Pocket PC or to the \Storage\Windows\Start Menu\Accessories directory on the Smartphone. That way users are able to find the deployed applications quickly using the Start menu.

CAB file creation and distribution

In PocketBuilder you can generate a CAB file with all the objects from a project and the project executable file. You can use the CAB file to distribute the project to multiple devices.

Online Help and documentation

PocketBuilder online Help can be accessed using Help buttons and menu items, or by selecting the F1 key from anywhere in PocketBuilder. There are jumps in several places from the online Help to books in HTML format. Manuals are also available on the Sybase Web site.

For more information

For additional information about PocketBuilder, see the Users Guide.