Tech Articles


Using PowerBuilder 2017 with TFS source control


This article is a guide to connect Powerbuilder 2017 with TFS. It is important to follow the steps in the order listed in the article.

The prerequisite includes

  • PB17 installed on a local machine.
  • TFS server running with access to the user. A collection is required where the code will be checked in. 

Next follow the below points:

  1. Team explorer 2013 : Yes the first thing needed is to install Visual studio team explorer. I know the first question pop ups in mind is if Visual studio needs to be installed on every machine !! Well the answer is NO. All you need is Team explorer 2013 to access the TFS. Second question is why 2013 ? Well there comes the 32 bit and 64 bit compatibility issues, moreover there is no standalone installer for Team explorer 2015. If you figured out a way to do it with later versions, then mention it in the comments. 
Read more

Elevate 2017 session: Frogpond


Frogpond – A study in game design

By: Matt Balent

Presented at the Elevate 2017 conference.

 

This project began as an exercise with two goals: improve my knowledge of the datawindow ‘modify’ method and provide a simple computer ‘game’ for my four year old to use to improve her mouse skills.  When I was thrust into the role of PowerBuilder consultant in 2007 I knew I had to improve my overall skill level with PB in order to be successful.  An area I had not done much prior work was using the ‘describe’ and ‘modify’ methods to alter a datawindow when the application was running.

Over the years I have demonstrated this application at a variety of user group meetings and conference sessions, often as  a way to pass time.  One near universal reaction is ‘I never knew you could do that in PowerBuilder!’  The source code is provided for this (PB2017 format) application.

Read more

PBDOM with PowerBuilder


​You might think, why should I bother using PBDOM? You can use PDOM to manipulate elements in an XML document. That means you can move elements within a document or from one document to another. You can add elements to a document or delete elements from a document. Moreover, with some coding it is even possible to import nested XML data into a DataWindow.

With the XML capabilities of the DataWindow introduced with PowerBuilder 9 it is possible to import and export data very fast and easily. You might have given a short look at the PBDOM definition in the PowerBuilder help but at the first sight, it looks quite difficult to handle. In the following article, I introduce PBDOM accompanied by some code samples.

Read more

Continuous Integration with PowerBuilder 2017, Bonobo Git and Jenkins


Note:  While the techniques described here still work, custom Jenkins plugins are now available which are easier to use.  They are described in this article.

 

In a previous blog post I examined how we could use the Git MSSCCI provider from PB Software in order to use GitHub as a source code provider for PowerBuilder.

In this blog post we're going to take that to the next step, in that we're going to create a build machine separate from our PowerBuilder development machine and then set it up to perform continuous integration.  The term "continuous integration" has a somewhat ambiguous definition, but generally it means that:

  • developers check in changes frequently (at least daily) and
  • that build are done on a regular basis (at least daily, but can be as frequently as after each check-in)

Ideally, automated testing routines would be run on each build to ensure that feedback on any functionality that was broken by the latest code changes are returned to the developers as soon as possible.  Automated testing is outside the scope of this particular article

One of the new features added in PowerBuilder 2017 is a license free stand alone compiler and we're going to use that for this article.   If you are using a older version of PowerBuilder you could use the same approach using the command line argument feature of the PowerBuilder IDE, but it would require installing the full PowerBuilder IDE (including a license) on the build machine.  Alternatively, regardless of which version of PowerBuilder you're using you could use PowerGen in scripted mode.

Read more

Getting Internal Info for the Current Window at Runtime


TITLE – Window Internals at runtime

“OK, what window are you in?”

“The Spanner Controller window.”

So here I’m shooting for the browser, w_spanner_controller? Nope, no w_spanner anything. W_controller_spanner? Nope, no w_controller anything.

“OK, what’s in the titlebar?” I ask, my frustration growing.

“Untitled, what does that mean?”

Have you ever worked on a system that had literally hundreds of windows with names that are not intuitive? I’ve seen names like w_a13_6.

There are times that at runtime we would love to get information about a window from the user. If only there were a way…

This solution requires a two prong approach. It requires that you have a base class window and a base class menu (see the NOTE at the bottom). Let’s start with the window.

Read more

The Class Definition Object (Part 2)


The ClassDefinition object was introduced in PowerBuilder 6.0 a long time ago. It allows you to retrieve information for an object at runtime. Most of us didn't pay too much attention to this object and it only attracts our attention when we see it in the debugger.

Listing the Objects from a Library

In the first article we had some theory about the ClassDefinition object and we were able to show the libraries of a PB application in a treeview control. This month, we read the objects from the libraries and inspect their content.

When a user expands an entry in the treeview, we check if it was expanded once already. If so, we don’t take any action. We code this in the itemexpanding event of the treeview control, where we get the clicked treeviewitem by calling This.GetItem. If it wasn’t expanded, we check if the level of the treeviewitem is equal to two, which means we’re expanding a library name. We could create an NVO to include all the logic for the parsing, but for demonstration purposes, I want to keep the things simple. We define all the functions we need on the window itself, but use arguments to refer to the controls. This will allow you to move the logic to an NVO later quite easily.

Read more

Configuring PowerBuilder projects to use GitHub for source control


Note:  In PowerBuilder 2017 R2, native support for Git was introduced into PowerBuilder.  The techniques described in this article work for older versions of PowerBuilder.  They work for 2017 R2 and later as well, but the native Git support introduced in 2017 R2 has better features and should be used instead.

 

Back in 2003, Sybase introduced CodeXchange, an online forum that allowed developers to share code samples and collaborate on open source projects.  Unfortunately, in 2009 Sybase decided to shut down that system.  The PowerBuilder code samples that had been uploaded tp CodeExchange did eventually show up again in a CodeXchange section of the PowerBuilder wiki on SAP's SCN.  Appeon also obtained permission from many of the authors to post those same PowerBuilder samples on the Code Samples section of the Appeon site.

However, the people who had collaborator projects on CodeXchange needed another option, because neither the SAP PowerBuilder wiki or the Appeon Code Samples site allowed for collaborative development.  Aware of the pending shutdown, I moved the PFC and PBNISMTP projects to Microsoft's CodePlex.

Read more

Find Articles by Tag

WinAPI RichTextEdit Control PDF Windows 10 Icons .NET Assembly Variable Debug Database Profile TLS/SSL PDFlib Platform InfoMaker RibbonBar Builder Script PFC Data Text Graph COM Import JSON Windows OS Messagging Encryption TortoiseGit UI Modernization UI Mobile Import ODBC Event Handling Resize Debugger Oracle Testing Sort RibbonBar Web Service Proxy CI/CD Azure Deployment Database Connection .NET Std Framework Window C# ActiveX DevOps Migration Repository Installation PowerBuilder Compiler Export Android DataWindow SqlModelMapper Debugging Menu RESTClient SQL Server Array IDE 64-bit Database Object Class Elevate Conference Charts PowerBuilder Authorization Design PowerServer Mobile HTTPClient Database REST Syntax Bug BLOB PBVM PBDOM JSON Filter CoderObject Authentication Configuration PostgreSQL DLL Database Table Schema Validation Icon Open Source Performance OAuth 2.0 OLE Event API PBNI SQL SVN XML SqlExecutor Expression SOAP File PostgreSQL ODBC driver JSONGenerator TreeView Outlook Excel TFS Git Database Table Data License Model Application Encoding Trial Visual Studio SDK Web API DataType iOS Database Table .NET DataStore PowerServer Web PowerBuilder (Appeon) Jenkins GhostScript Event Handler External Functions DragDrop Export JSON Linux OS JSONParser Source Code Stored Procedure UI Themes Branch & Merge NativePDF Interface Source Control WebBrowser SnapDevelop MessageBox SnapObjects Database Painter Service 32-bit Error Transaction Automated Testing OAuth PowerScript (PS) CrypterObject OrcaScript DataWindow JSON