[Appeon] Error opening windows (using OpenSheet and/or OpenSheetWithParm)

[Appeon] Error opening windows (using OpenSheet and/or OpenSheetWithParm)

Overview

Ever faced the perplexing issue of windows not opening in your Appeon application, despite everything working perfectly in PowerBuilder? Dive into our exploration where we unravel the mystery behind the failure of the OpenSheet and OpenSheetWithParm functions in certain scenarios. We share our encounter with a sneaky space character that turned out to be the villain, and how a simple fix restored harmony across platforms. A must-read for developers navigating the nuances of PowerBuilder and Appeon.

Not all PowerBuilder operations works the same way in Appeon. Fortunately, OpenSheet and OpenSheetWithParm do work the same way on both plataforms. Which is not the same as saying errors won"t happen only when the application is running on Appeon.

We did some tests and noticed that both functions (OpenSheet and OpenSheetWithParm) return -1 (failure) when we tried to open certain Windows that were, apparently, working properly in PowerBuilder.

In some cases, the problem may not be in the window itself, but in the way Appeon compiles the code in them.

In one application, some of windows were not opening and OpenSheet function always returned -1. Later on, we noticed that the menu name had a space at the end. Yes, a simple space character at the end of the menu name of the window was causing the errors. (Example: “mn_main_action “)

Appeon Opensheet Error

Appeon Opensheet Error

In the image above, you can see there is a character (space) after the menu name. That"s the culprit right there.

The solution is simple: Just remove this extra space, save and perform a new implant.

Appeon Opensheet Error Fixed

Appeon Opensheet Error Fixed

As you can see in the above image, the problem has been fixed and the window will now open normally in both PowerBuilder and Appeon.

I don"t know if this problem can also affect DataWindow or DataStore objects, but it"s good to be aware if they start to misbehave only when running in Appeon.

Translations: