Welcome to the Appeon Community!
Learn, share knowledge, and get help.
Featured Blogs
Featured Articles
Quick start for contributing to Open Source PFC
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)
A Simple Methodology for Complex Resizing Scenarios Using the PFC
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 moreApplying a New UI Theme to Your Application
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 moreImplementing OAuth 2.0 Authorization with PowerBuilder 2019 R2
Introduction
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 moreHow to Define Events for RibbonBar Controls
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)
Enhanced JSON handling
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 moreNew Articles
DataWindow - Code Samples from CodeXchange
In this article you will find a list of Code Samples related to DataWindows for your PowerBuilder apps. These code examples are found at Appeon's CodeXChange.
Read more
Free Utilities - Code Samples from CodeXchange
In this article you will find a list of Code Samples related to Free Utilities for your PowerBuilder apps. These code examples are found at Appeon's CodeXChange.
Read more
API Enablement - Code Samples from CodeXchange
In this article you will find a list of Code Samples related to API Enablement of your PowerBuilder apps. These code examples are found at Appeon's CodeXChange.
Read more
UI Modernization - Code Samples from CodeXchange
In this article you will find a list of Code Samples related to UI Modernization of your PowerBuilder apps. These code examples are found at Appeon's CodeXChange.
Read more