Helping Developers Master PowerBuilder Classic and .NET

Yakov Werde

Subscribe to Yakov Werde: eMailAlertsEmail Alerts
Get Yakov Werde: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Blog Post

PowerBuilder 12.1 .NET IDE Productivity

Hiding those pesky migration warning messages

I recently migrated a Classic MDI application to .NET.  One of the nice features that helped me prepare my code for .NET deployment is the Unsupported Feature list that appears in a selectable view in the Output window.   That view gets populated following a build if the app has unsupported features.  The unsupported list is a very useful guide to locating and navigating to lines of code and property references that need your special attention.  Here's what it looks like:

Output View

While working my way through the code I noted that some unsupported features are innocuous.  The PowerScript precompiler doesn't generate them into the C# code.  Their presence has no impact on the resulting application.  As a busy developer, with deadlines to meet, I'm tempted to not remove them from the code until I have some spare time. But it I don't the pesky output window keeps reminding me that they're there.  I don't want to be annoyed all the time by having them show during each build.

Thankfully, the product engineers added an option checkbox to the project object in version 12.1 that allows you to suppress unsupported feature listing output following a build.  Checking the option suppresses ALL unsupported feature output, unchecking it (the default) includes all unsupported features in the output view.  Here's how it looks:

Project Painter

The result:

What was a little confusing to me was the use of the "Suppress the following warnings" edit.  My first impression was that I could use it to list just those unsupported features that I didn't care about and let the rest show.  However, I wasn't sure what to type into the edit to get the desired effect.  First I tried clipping text from the output window and pasting it in.   Then I tried entering just object.line numbers.  Both attempts had no effect on the output.  In fact when I saved the project, embedded spaces and periods were converted to commas.  Here's how that attempt looked

Wrong Attempt

Finally, my former colleague and PowerBuilder .NET IDE software engineer, Evan Rothfield, showed me the error in my thinking.  Here's what he said, "The checkbox and edit have nothing to do with each other.  The checkbox controls the output of "unsupported feature" warnings, which don't have an identifier.  If you check the checkbox, you won't get any of those.   The edit is for warnings that do have an identifier.  For example, if you have a FOR loop like this:

uint i
for i = -1 to 4
i = i
next

You will get this warning:

C0110: Mixing signed and unsigned values in for statement.

If you put C0110 in the edit, you can suppress that warning.  We treat unsupported feature warnings as "distinct" from other warnings since they go in a separate "pane" of the output window. Unsupported feature warnings don't have an identifier so they are treated separately"  Here's how the output looks with the warning turned off:

In summary, you can control which warning message the compiler will display in the output window to suit your tastes as you work through migrating your application

Happy PowerBuilding

More Stories By Yakov Werde

Yakov Werde, a 25 year IT industry veteran, is a member of TeamSybase and the newly formed Sybase Customer Evangelist Team. Yakov is a recognized author, speaker and trainer who has been designing and delivering PowerBuilder, .NET, EaServer, Web App Development, and Java training for over 14 years to corporate, military and government developers. Prior to discovering his aptitude as an educator, Yakov worked as an architect, project manager and application coder in the trenches of application software development. Yakov holds a Masters in Education with a specialty in instructional design for online learning from Capella University and a BS in math and computer science from Florida International University. Yakov, managing partner of eLearnIT LLC (www.elearnitonline.com), authors and delivers workshops and web based eLearning tutorials to guide professional developers toward PowerBuilder Classic and .NET mastery. Follow Yakov on Twitter as @eLearnPB