PowerBuilder

French version

Here are some tricks and source codes for PowerBuilder.
Any remark, suggestion, question is welcome. Feel free to drop me a mail.

You can take a look to my collection of PB related links (on Del.icio.us)

You like my work ? Tell me :

PBNI Extensions

PBNI = PowerBuilder Native Interface, it's a SDK provided by Sybase that let you create some extensions for PB in C++ (with Microsoft Visual Studio)

Fork me on GitHub

PbniRegex + PbRegexCoach

As an attempt to fix the performance issue of unvo_regexp I've written a PBNI extension that can execute perl-compatible regexps (with the PCRE engine). The extension also provides a replaceall global function.
The extension is written with the SDK given with PB and starting from samples found on Codexchange.

Key features of uo_regex object:

To test the extension, I have also made PbRegexCoach (kinda remake of The Regex Coach) :
PbRegexCoach
That application also reuses several components written by Nicolas Georges : auto-resizer, horizontal & vertical splitters derived from Roland Smith ones. He has also published an example of pbniregex usage.
Extension pbniregex.zip (sources included) + PbRegexCoach - Last update : Monday July 4 2011.

ChangeLog
Fork me on GitHub

PbniHash

The hashtable (also : dictionary, associative array) is a useful data structure, alas it is not available natively in Powerbuilder.
The libhashish opensource lib implements several hashing algorithms under GNU/Linux. I have ported that lib to Windows thanks to MinGW (Nicolas Georges has disabled the tree hashing algorithm for allowing us to reuse libhashish under the BSD licence) and I have wrote a pbni extension that provides hashtables to Powerscript.

The libhashish has many features but my wrapper is limitted to the bare features :

Extension pbnihash.zip (sources included) + PB sample - Last update : Sunday July 3 2011.

ChangeLog
Fork me on GitHub

PbniList

The linked list is another missing feature from PowerBuilder. Since the pbni sdk is in C++ I have used the STL to implement a list (uo_list) and a vector (uo_vector).
My own lists and vectors have the following interesting features:

Extension pbnilist.zip (sources included) + PB sample - Last update : Monday July 4 2011.

ChangeLog

PbniCW - Cool Wrappers

These are several wrappers that could not be included in former extensions.
List of features :

Known bugs

Extension pbnicw.zip (sources included) + PB sample - Last update : Monday 17 May 2010.

ChangeLog

Other components - userobjects

unvo_regexp

unvo_regexp is a native userobject that remaps vbscript.regex OLE object (author : Nicolas Georges). The supported syntax is listed in the instance variables view (it's the regular vbscript.regex syntax).
That userobject is quite useful for casual usage. But the performance is not that good for example if you instanciate the object in loops due to the connection to the OLE object in the constructor event.

splitters

u_scilexer

Roland Smith has published in Topwiz Software a PB warpper for the Scintilla editor. With the help of Nicolas Georges, I have added the support for margin icons, code completion and others features. Here is my implementation : u_scilexer.sru (you need also the scintilla dll renamed to "scilexer.dll").
Last update : Sunday October 30 2011.

n_zlib

n_zlib.sru: another component from Roland Smith to wrap the zlib in PB. I have added the support for the gzipped streams to Roland's implementation.
Last update : Wednesday June 11 2014.

nv_mailslot

nv_mailslot.sru is an object to use the mailslots (the mailslot is a solution for inter-process communication under Windows). To test the implementation, I have coded a sample in PB and another one in java : MailSlotPB.zip.

nv_codec_base64

nv_codec_base64.sru is a pbscript implementation of a base64 codec (for a decent performance there is a dependency with pbnicw for the bitwise operations). The encoding is quite slow though for big amounts of data, do not use it on mega bytes...

Complementary tools

FILL ME: script perl check pbg
FILL ME: script perl dw

pbdumper

pbdumper is an experimental tool that can export the whole content of a PB library (pbl / pbd) or PB dll or executable. This tool was successfully tested with libs produced by PB from the version 5 to 10.5 and should work also with PB 11 / PB 12 if the pbl structure did not changed. I have used that tool to get some resources from applications that were written by my company and sources eventually lost.
It is written in C99 and built with MinGW. This tool could not have existed without the precious infos from the PBL file format released by Arnd Schmidt. He also made some tools to explore the PB libraries.
Todo :

pbdumper - Last update : Tuesday 13 March 2012

ChangeLog

Links

hacker emblem Valid XHTML 1.1! Valid CSS!
Made with GNU/Emacs Total Commander contributes to the maintenance of this site
Sébastien Kirche
Back to main page
Last update : Wednesday June 11 2014.