About the sample applications
PowerBuilder provides several sample applications, including
some developed by PowerBuilder users. All the source code is provided
for each application so you can learn and reuse the techniques these
developers have used.
One of the sample applications, PowerBuilder Code Examples,
contains many examples you can use to learn a range of coding techniques.
The examples are specifically designed to show you how to use different
coding techniques with both old and new PowerBuilder features.
Installing the examples
The sample applications are installed in the Code Examples
subdirectory in your PowerBuilder 7 directory. Many of the
examples use a sample Adaptive Server Anywhere database called the EAS Demo DB,
which is installed in the Demo DB directory. If you can’t
find either of these directories, the sample applications and the
database may not have been installed.
Sample applications on the Web Additional PowerBuilder sample applications are available on
the Sybase web site. You can access them from a link on the PowerBuilder
help menu.
Using sample applications
You can use most of the sample applications as applications–for
example, you can use the CashTrak application to manage your finances
if you want to. But you can also open an application in the PowerBuilder development environment
and examine the code behind each window or control.
Before you look at the code behind an application, you can
run it in the development environment to see how it works. The online
Help for the application will tell you how to use it.
Running a sample application
The next section describes how to make the Code Examples application
your current application, how to modify its library list so that
all the objects it needs are available, and how to run it in the
development environment. Use the same procedure to run the other
sample applications. Some applications have only one PBL, but some
have several. Once you’ve selected the PBL that contains the
application object in the Select Application dialog box, you usually
need to add all the other PBLs in the directory to the library list.