Welcome to the Appeon Community!
Learn, share knowledge, and get help.
Given that not everyone is fluent in using Git and or Github (where the Open Source PFC is hosted now), I put together a quick introduction in how to get started. The video below walks through the steps, which in summary are:
- Create a GitHub account if you don't already have one. https://github.com/join
- Navigate to the Open Source PFC and "Fork" a copy of the code into your account. The 2019 version of the PFC can be found at: https://github.com/OpenSourcePFCLibraries/2019
- Chose Code -> Clone and copy the HTTPS URL for your fork.
- Open the PowerBuilder 2019 IDE and with no workspace open select File -> Connect to Workspace.
- Source Control System: Choose Git
- Repository URL: Paste in the URL you copied above
- Workspace File: Give it any name you choose
- User ID: Your Github user id (normally your email address)
- Password: Your Github password
- Checkout Directory: Select or create a new empty subdirectory on your local machine for the code to be copied to
- Wait until the source code is downloaded and refreshed (12 to 15 minutes)
This tutorial is an update to the 2019 tutorial. If you have zero experience with the UI Theme feature, please first follow our Quick Start tutorial. If you are ready to gain a comprehensive understanding of this feature and dive deeper into UI Theme settings, then please proceed with this updated tutorial.
Starting from PowerBuilder 2019, Appeon added the UI theme feature to PowerBuilder so that developers can codelessly control how commonly-used controls and objects render during application runtime.Read more
PowerBuilder supports getting secured data from the OAuth 2.0 authorization server. The Bearer access token is supported, and the following grant types are supported:
- Authorization Code
- Implicit Flow
- Client Credentials
- Extension (or Refresh Token)
- Resource Owner Password
This document provides an example on how to set up OAuth 2.0 authorization workflow using the Authorization Code grant type in a PowerBuilder application.Read more
Learning to define user events for items in the RibbonBar control feels like a lot of trial and error.
Different items support different events. Same event type requires different parameters.
My aim with this article is to take "... and error" out of your RibbonBar coding.
For each ribbon item type you get user event definitions that work.
Each ribbon item has its own XML element (here: Print Title is a CheckBox).
Each item binds specific user events via properties (here: Clicked on CheckBox binds to ue_PrintTitle)
Each user event must have the correct parameter list (here: Clicked event for CheckBox always requires al_handle while no other parameters allowed)
Each item type has its own PowerScript class and functions to obtain the object (here: Obtain class = RibbonCheckBoxItem via function GetCheckBox)
Why enhance JSON handling?
Reading and writing JSON in PowerBuilder is simple using PowerBuilder’s RESTClient object; however, the JSON needs to be in a two-dimensional format. But there are times when the JSON you are working with has multiple nested levels, especially if working with data from an external interface not under your control.
The PowerBuilder objects JSONParser and JSONGenerator can be used to parse or generate such JSON with multiple nested levels. However, a key caveat is that the JSONParser and JSONGenerator require the JSON data to be accessed through “handles”. For example, the getItemObject() returns a handle rather than the full JSON object. Compared to an object-based approach, this handle-based approach requires more coding by the developer.Read more
REST support was added to PowerBuilder in 2017 R2 and enhanced in 2017 R3. PowerBuilder 2019 contains additional significant enhancements to REST support, including the following:
- RetrieveOne method – For REST methods return one row
- Submit method - sends request and returns data in one operation
- SetRequestHeader behavior modified
- GZIP compression handled automatically
- Send[Method]Request, where method can be Get, Put, Post, Patch, Delete
- Get and Set OAuth token methods
- Get and set JWT token methods
The Resize service included in the PowerBuilder Foundation Class (PFC) framework is a powerful, yet easy-to-use tool in the developer’s toolbox. Due to several factors, however, many PB developers struggle to make the Resize service perform as they would like, particularly when the layout of window controls and/or the desired resizing behavior steps become non-trivial… and often the developer ends up getting frustrated. As a result, the desired functionality is frequently omitted or severely curtailed.
The issue is not that the Resize service is unable to perform the desired task(s) – I believe it can, in many (perhaps not all) cases. The real issue is learning how to effectively utilize the functionality that already exists. There admittedly is not a lot of instructional material available on how to use the PFC in general and the Resize service in particular, so I’ve created an easy-to-follow methodology you can use to make the Resize service do what you want instead of the Resize service making you to do what it wants.
As you’ll soon see, the steps I describe in this tutorial are simple, yet they can be quickly applied to complex resizing scenarios. I’m also going to give you some free code that implements a couple of handy resize-related features you may want to add to your projects.Read more
This tutorial has discussed how to interface traditional, Windows-hosted PowerBuilder 32-bit and 64-bit applications with the Windows Application Programming Interface (API), also known as the WinAPI. In the first three parts, the groundwork was laid to make you more knowledgeable and comfortable coding External Function Declarations (EFD's) and understanding the nuances of how information is exchanged between PB and Windows API functions. Part four contains a list of coding tips and techniques and mapping tables to help you with the translation between many common WinAPI datatypes and the standard PB datatypes. It also describes a free PB sample application and non-visual user object that can dynamically determine the memory size and layout of a structure in either 32-bit or 64-bit environments.Read more
When you push your repository from PowerBuilder IDE to your Git server for the first time after you do the Add to Source Control, it may fail when the size of your source code is large and/or your network is slow.Read more
Note: This blog entry is basically the written version of a video I did for the SAP Database and Technology Academy. You can either watch the video or read the blog entry, or both if you're so inclined.Read more