PocketBuilder features

PocketBuilder is a 4GL application development tool for the Windows CE platform. It enables you to build rich-client handheld applications on the desktop and deploy them to a Windows CE environment.

The PocketBuilder IDE is similar to that of PowerBuilder. If you are a PowerBuilder user, you can leverage your existing PowerBuilder skill set, reusing knowledge and expertise to build and deploy mobile applications.

Key features

Key features of PocketBuilder include:

PocketBuilder supports many PowerBuilder features without modification. You can reuse code from PowerBuilder applications, although PowerBuilder projects that you import to PocketBuilder must be redesigned for deployment to handheld devices.

File name changes

Although PowerBuilder and PocketBuilder use the same file extensions for exported objects, file extensions for libraries, targets, workspaces, and resource files differ to prevent confusion for developers who work with both products. Table B-1 lists the differences between these extensions.

Table B-1: File extensions that differ

File type

PowerBuilder extension

PocketBuilder extension

Workspace

PBW

PKW

Target

PBT

PKT

Library

PBL

PKL

Dynamic library

PBD

PKD

Resource file

PBR

PKR

Trace file

PBP

PKP

The file name for the PocketBuilder initialization file is PK.INI; the PowerBuilder initialization file is PB.INI. Both PocketBuilder and PowerBuilder 10 primarily support Unicode, although they allow you to import and export files with ANSI character sets. PowerBuilder 9 primarily supports ANSI character sets.

Environment variables

In both products, the enumerated types for the Environment object returned by a GetEnvironment call include the OSType and CPUType. PocketBuilder has additional values for the GetEnvironment OSType and CPUType. For a Pocket PC or Smartphone device, or a Windows Mobile 5 or later emulator, the value returned for the GetEnvironment OSType is “WindowsCE!” and the value returned for the CPUType is “ARM!”. For other Pocket PC or Smartphone emulators, the value returned for the CPUType is “Pentium!”.

System functions and window events for the Soft Input Panel

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. Table B-2 lists the system functions you can use to control the SIP display. The SipUp and SipDown window events occur when the SIP is opened and closed, respectively.

Table B-2: System functions for displaying and selecting the SIP

Function

Description

GetDeskRect

Gets the rectangular coordinates, in pixels, of the current window without including the area of the SIP when the latter is visible

GetSIPRect

Gets the rectangular coordinates of the SIP, whether it is visible or not

GetSIPType

Returns the type of the current SIP window, whether it is visible or not

IsSIPVisible

Indicates whether the SIP is currently visible to the user

SetRuntimeProperty

Allows you to set the following SIP properties at runtime: AllowAutomaticSIPHandling, SIPOnFocusUp_AlternateTechnique, and SIPOnFocusDown_AlternateTechnique.

SetSIPPreferredState

Displays or hides the SIP used on the Pocket PC or emulator

SetSIPType

Specifies the SIP panel type (keyboard or character recognizer) used by the application on a Pocket PC or emulator

Syntax and usage notes for the SIP system functions and window events are described in the online Help. These functions and events are not available in PowerBuilder applications.

System function for obtaining localized folder names

Operating systems using different languages can have different names for system folders. The GetSpecialFolder system function provides a means of obtaining the name of a system folder on a specific desktop machine or deployment device. This enables you to develop applications that access system folders and can still be deployed to devices using different language operating systems.

Objects and controls for Windows CE platforms

PocketBuilder includes objects and controls that are available to Windows CE platforms. Table B-3 lists these objects and controls. For more information, see Chapter 15, “Working with Native Objects and Controls for Windows CE Devices,”or Objects and Controls and the PowerScript Reference.

Table B-3: Native objects and controls for Windows CE platforms

PocketBuilder object or control

Description

BarcodeScanner object

Base class for capturing bar codes

BiometricScanner object

Base class for capturing fingerprints

CallLog and CallLogEntry objects

Intefaces with the call log on a Smartphone or a Pocket PC Phone Edition device

DialingDirectory object

Interfaces with the phone books on a Smartphone, SIM card, or Pocket PC device

NotificationBubble object

Displays a message to the application user

PhoneCall object

Makes a phone call from a Smartphone or Pocket PC Phone Edition device

POOM object (including POOMAppointment, POOMContact, POOMTask, POOMRecurrence, and POOMRecipient objects)

Stores appointments, contacts, and tasks, and integrates an application with the Pocket PC calendar and contact manager

Signature control

Captures user signatures, but can also capture hand drawings

SMSSession, SMSAddress, SMSMessage, SMSProtocol, and SMSProviderSpecificData objects

Interfaces with the SMS messaging system on a Smartphone or Pocket PC Phone Edition

Today item

Adds a custom item to the Pocket PC Today screen (Start page)

Toolbar control (including ToolbarItem objects)

Useful as a visual extension to a Pocket PC application menu