I’m working with a ‘pre-Cambrian’ framework of sorts which has a datawindow ancestor with quite a lot of functionality in it. One standard piece in list type datawindows is to insert a blank row when the user opens a window. This way the user doesn’t have to click a ‘new’ button or do something else…
You are currently browsing all posts tagged with Powerbuilder
PowerBuilder ‘Gotcha’ – Removing Blank Rows from Datawindow
PowerBuilder – Application path
So you need to check some file you have deployed with your application and you have chosen to put it in the same folder as the executable. Sure, I’ll just check the current folder when the application launches and I’ll have what I need. Wrong. Since an application can be launched with a ‘Start In’…
PowerBuilder – Accessing C# Classes via COM to Capture a Screenshot
I was working with setting up screen capture functionality from within a PB11.5 application recently and came up against a wall which forced me to rethink my strategy. Initially I was using External Functions to the Windows gdi32.dll but had issues with my code causing it to ‘stop working’ after a few files were written.…
PowerBuilder – Setting column value without looping through all rows.
A question came up on the TekTips website about setting a column in all the rows in a datawindow to the same value without looping through. In this case the writer was loading data from over one hundred Excel files and wanted to track the filename of where the data came from. At first I…
PowerBuilder ‘Gotcha’ – SQLServer OLE DB and Identity columns
So I get a new machine at work and I’m busy loading all my development tools on it as well as changing settings and all such stuff. SQL Server and PowerBuilder get installed and upgraded, connected to Source Control, and I run the application from within the IDE. Things are fine until I insert a…
PowerBuilder – Development vs. Production Mode
You can set up a variety of helpful methods for use while developing an application which you don’t want users to get their hands on when in production. One example of this is my Window Information Service . To make this only available when running from the Powerbuilder IDE use the following steps. Set up…
PowerBuilder – PFC String service extension
Here is a simple modification to the PFC string service (n_cst_string) which will parse out an array of any datatype and returned a delimited string of the contents. The new method is a polymorph of the existing of_arraytostring. public function long of_arraytostring (any aa_array[], string as_delimiter, ref string as_string) // convert array to string array…
PowerBuilder ‘Gotcha’ – Autoscript and Clipboard
Ah, you finally gotten the time to refactor some code or maybe even clean up some proof of concept to move it into an actual application and now it’s time to make the stuff more ‘Object Oriented’. You look in your Open method and it’s full of various stuff. You create a new method to…
PowerBuilder – Adding a Structure to an NVO
It is possible to define a structure within an non-visual object. You can view/ or edit the source of the nvo and insert the structure definition directly: global type nvo_case from nonvisualobject end type type str_test from structure within nvo_case end type end forward type str_test from structure string as_parm1 string as_parm2 end type global…
PowerBuilder ‘Gotcha’ – Window Hangs when Opened
So your working on some prototype for a proof of concept and are banging away at your code. Cut paste, snip, add error checking for just one case, add another control, etc., etc., and etc. You run the application, your window loads, and then things hang. You check the code, you check the database, you…