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

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

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

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.

The following two tabs change content below.
Software Architect and Backend Developer (almost Fullstack), I usually work with C#, PowerShell, Python, Golang, bash and Unity (this one is more for a hobby). I'm always looking for something new to learn, adding new tools to my utility belt.
Posted in Dev, PowerBuilder and tagged , , , , , , , , .