1. Olan Knight
  2. PowerBuilder
  3. Tuesday, 8 June 2021 12:47 PM UTC

Two questions.

1) SDI
I have a PBv12.1 exe complete with one DLL called INVOICING.
There is only one window, of type MAIN.

The goal was for this to be an SDI application, and maybe I did that  ???? but I can find no documentation on how to create an SDI application. Yes, I saw the blurb about the MDI/SDI option when using the Application Template Wizard in the HELP, but I could not see that option in the Wizard when running it.

Did I create an SDI application?
If so, then why does it terminate after a few seconds when called via the RUN command (see #2 below)?

 

2) Runtime behavior
I have my major app in PB2019R3, which calls the Invoicing exe with a RUN command:

// Create the command to be executed:  EXE and string parameter; ls_title = name of calling window
ls_cmd = "C:\APPS12\invoicing\cabs_invoicing.exe " + ls_title

// Actually start the INVOICING process....
ll_ret = run (ls_cmd)


When I run the Invoicing app through the PBv12.1 IDE, the window opens and STAYS open. There is no activity coded into the window yet; and I expect the window to stay open

When I call Invoicing using the RUN command, the window opens, remains open for a few seconds, then exits!

Why is the window closing in this situation?

Brad Mettee Accepted Answer Pending Moderation
  1. Thursday, 10 June 2021 13:25 PM UTC
  2. PowerBuilder
  3. # 1

Try adding /pbdebug to the cmdline when you "run" the SDI application. Looking at the log file you might be able to figure out where it's closing.

Comment
  1. Olan Knight
  2. Thursday, 10 June 2021 14:13 PM UTC
I'll try that. Thank you!

  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 10 June 2021 08:30 AM UTC
  2. PowerBuilder
  3. # 2

How are the runtime libraries being found for both powerbuilder applications of different versions?

Do you have them installed as runtimes or are the 2 applications "finding" them in some folder like the folder where the EXE files are?

regards

Comment
  1. Roland Smith
  2. Thursday, 10 June 2021 14:48 PM UTC
If finding the PB12 runtime was the problem, the window wouldn't appear at all.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 10 June 2021 14:54 PM UTC
If the runtime files would be in the directory of the pb12 exe, it might initially start, but then when the 2019 app keeps running the internal current windows directory might change away from the initial directory where the pb12 exe is located.

Hence my question if there's a runtime installed or not.

Maybe you're right.

regards.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 10 June 2021 14:59 PM UTC
Miguel Leeuwe

An easy way to fix that would be to add the pb12 exe's path to the path environment variables. Not only for the runtime but also for the "single" DLL that makes part of the application.
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Thursday, 10 June 2021 07:55 AM UTC
  2. PowerBuilder
  3. # 3

Hi Olan,

to (partially) answer your first question, as far as I know there's no inherent difference between an MDI or SDI PB application. The difference is just that your main window will be of windowtype main! in SDI and mdi! or mdihelp! in MDI.

 

Some questions:

1: What kind of WindowType does your invoice app have?

2: Does it stay open when you run the exe directly? Also try running it from cmd with the exact commandline you're using when running it from your PB2019 app.

Comment
  1. Olan Knight
  2. Thursday, 10 June 2021 14:15 PM UTC
The windowtype of the Invoicing app is MAIN!.

When I run the Invoicing EXE stand-alone, by double-clickin the EXE, the window opens and remains open as I expect.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 8 June 2021 18:17 PM UTC
  2. PowerBuilder
  3. # 4

A PB app doesn't have to have a window.

The application open event could instantiate a NVO and call the main processing function within it. Then when the function returns, the program would end. Put the database connect before the function call and the disconnect in the close event as usual.

 

Comment
  1. Miguel Leeuwe
  2. Wednesday, 9 June 2021 07:26 AM UTC
That sounds pretty weird to me :)

Could you post a small sample app to reproduce this case?

regards
  1. Helpful
  1. Olan Knight
  2. Thursday, 10 June 2021 14:17 PM UTC
I know, right?

I can try to create a small sample app, it's really straightforward.

Aaaaaaaand......... this morning my VM died. SO I'm out of action until it gets fixed and I get to restore my work.

*Sigh*
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 11 June 2021 12:46 PM UTC
LOL, I feel for U bro. Maybe if I have some time this weekend I'll try to reproduce your problem. Somehow I think it has to do with the pb12 app loosing track of it's DLL or runtimes ...
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.