| By Bruce Armstrong | Article Rating: |
|
| November 29, 2010 08:15 AM EST | Reads: |
5,274 |
The PowerBuilder 12.1 maintenance release is now available. For people who believe that you should never use the .0 release of any product, the maintenance release means they should feel comfortable using PowerBuilder 12 now. However, there are several good reasons other than that to get the maintenance release, including a number of important new features it introduces. We'll look at the important ones below.
Database connectivity:
The maintenance release adds support for connectivity to ASE 15.5 and SQL Anywhere 12.0. There is no additional functionality specific to those versions though.

DataWindow enhancements:
- Find Function: An optional buffer argument has been added to the Find function that allows for searching in the Delete and Filter buffers.
- HasMinHeight property (PowerBuilder Classic only): The HasMinHeight property instructs the DataWindow not to shrink an autosize height column smaller than its original size. Without this property set, an autosize height column could collapse to no height at all if there wasn't data in it.
- FontHeight function (PowerBuilder Classic only): The function returns the height of the font in a column so that you can set the minimum height of the column to match it.
- FlowDirection property (WPF DataWindow only): The FlowDirection property replaces the RightToLeft property for WPF DataWindows. RightToLeft is still supported for migrated DataWindows, but it is no longer shown as an option in the WPF DataWindow painter.

Language enhancements:
Arrays bounds can now be determined at runtime (PowerBuilder.NET only).
Project enhancements:
- Use an existing target for project options (WPF Targets only): When migrating an existing target to WPF rather than specifying all the project options by hand, you can choose to select another existing WPF target and have the project options from that target applied to the new target.
- Suppress Warnings (WPF and .NET Assembly targets only): In the project painter you can choose to ignore warnings. One option is to simply ignore all "Unsupported Feature" warnings. Another option is to provide a comma-delimited list of specific warning message numbers that you want to ignore.
WPF enhancements (WPF Targets only):
A new "Synch Script with Layout" option has been added to the Design menu in the WPF designer to ensure that the script editor is up-to-date with controls that have been added in the XAML. The release notes indicate that the use of third-party WPF controls are now officially supported. I found that I was able to use third-party WPF controls prior to the 12.1 maintenance release, but I have found that the WPF designer's behavior was enhanced with the 12.1 maintenance release installed.

OLE Control Support (WPF Targets only):
Perhaps saving the best for last, the 12.1 maintenance release adds support for migrating applications that use OLE Controls (e.g., ActiveX controls). This was a significant hole in the ability to migrate existing applications with the initial .0 release. Sybase isn't doing anything different than what .NET supports. The AxImp utility in the .NET SDK creates a WinForm wrapper around ActiveX controls.[1] The WindowsFormsHost class in WPF in turn allows you to show a WinForm control in a WPF application.[2] So once you've got a Windows Form wrapper for your ActiveX control, you can host that in a WPF WindowsFormHost control. Microsoft even has a walkthrough document explaining how to do it manually.[3] You could have followed that same approach after migrating your application using the .0 release to reincorporate the ActiveX controls. However, the 12.1 release eliminates the need to do that, as it will handle the steps for you.
What the 12.1 maintenance release won't do for you is allow you to add new ActiveX controls to the migrated WPF application. For that, you would need to perform the steps from the walkthrough manually. You don't need to create the project referenced in the first step of that walkthough; you just need to run AxImp manually against the ActiveX control. However, because of a number of limitations in the WinForm wrapper around the ActiveX approach, Sybase highly recommends finding real WPF controls that implement the desired functionality rather than relying on ActiveX controls.
Not bad for a maintenance release. Of course, 12.5 (a major release, not a maintenance release) is in the works, and the 12.2 maintenance release is scheduled to be released in December of 2010.
References
Published November 29, 2010 Reads 5,274
Copyright © 2010 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Bruce Armstrong
Bruce Armstrong is a development lead with Integrated Data Services (www.get-integrated.com). A charter member of TeamSybase, he has been using PowerBuilder since version 1.0.B. He was a contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and the editor of SAMs' PowerBuilder 9: Advanced Client/Server Development.

