Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Distributing resources – PB Docs 90 – PowerBuilder Library

Distributing resources – PB Docs 90

Distributing resources

You can choose to distribute your resources (pictures, pointers,
and icons) separately or include them in your executable file or
dynamic library.

Distributing resources separately

When a resource is referenced at runtime, if the resource
has not been included in the executable file or in a dynamic library,
PowerBuilder looks for it in the search path. You need to distribute
resources with your application and make sure they get installed
in the user’s search path.

For example, assume you use two bitmap files as in the following
script:

You can distribute the files frown.bmp and smile.bmp with
your application. If the files are on the search path at runtime,
the application can load them when they are needed.

The Windows search path is as follows:

  1. The current directory
  2. The Windows directory
  3. The Windows system directory
  4. All directories in the PATH environment variable

Using PowerBuilder resource files

Instead of distributing resources separately, you can create
a PowerBuilder resource file (a PBR file) that lists all dynamically
assigned resources.

A PBR file is an ASCII text file in which you list resource
names (such as BMP, CUR, GIF, ICO, JPEG, RLE, and WMF files) and
DataWindow objects. To create a PBR file, use a text editor. List
the name of each resource, one resource on each line, then save
the list as a file with the extension PBR. Here is a sample PBR
file:

PowerBuilder compiles the listed resources into the executable
file or a dynamic library file, so the resources are available directly
at runtime.

note.gif Using DataWindow objects If the objects in one PBL reference DataWindow objects, either
statically or dynamically, that are in a different PBL, you must
either specify a PowerBuilder resource file that includes the DataWindow
objects, or define the library that includes them as a PBD or DLL
that you distribute with your application. You cannot distribute
them separately as you can image files.

For more information about creating and using PBR files, see
the chapter on packaging your application for deployment in Application
Techniques

.

What happens at runtime

When a resource such as a bitmap is referenced at runtime,
PowerBuilder first looks in the executable file for it. Failing
that, it looks in the PBDs that are defined for the application.
Failing that, it looks in directories in the search path for the
file.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x