1. Mark Montgomery
  2. PowerBuilder
  3. Wednesday, 6 March 2024 14:47 PM UTC

Hello all fellow PB'ers,

Not sure how to title this question.

Using PowerBuilder 2022 R2 (Build 2828), we are seeing some weird error messages generated from our application (typically null object references) and I was curious if the following could be the cause of the errors.

In our application, we’re using a window with a web browser control that allows the user to connect to an external web site.  On that site, they can accept calls from customers which sends JSON to the web browser control in our application.  This opens a window in our application with information about the customer.

When the user is not in an active call, they are doing other things in the application.  I’ve noticed that if a response window is open (say w_response) and a call is received, a new window (say w_customer) is opened from the web browser control and the user can interact with it.  Once they close w_customer, they can then do other things within the application while w_response is still open.  Once they click on w_response, then things work as expected where they can’t click away from it.  However, nothing forces them to go back to w_response.

I’m kind of grasping at what may be happening but was wondering if something with the PB engine doesn’t like having a response window open while other things are then actively going on.  I had thought about trying to close any open response windows before opening w_customer, but that’s going to require a lot of work, I believe.

Any feedback is appreciated.

Thanks,

Mark

Kevin Ridley Accepted Answer Pending Moderation
  1. Wednesday, 6 March 2024 16:31 PM UTC
  2. PowerBuilder
  3. # 1

Just to make sure I understand, you're saying the response window is being opened through code right, not some error message automatically popping up from a bad condition?  If you are opening an instance of w_response through code, you could setup an nvo that acts as a "window manager" to open and keep track of open windows as a global variable.  You would register each window, and I'd probably keep track of the type (response, etc) you open with this service, and unregister when each window closes.  When this browser tries to open a new window, it would call a method on the window manager which could then check to see if there was an open response window.  Then you could decide what to do at that point if there's an open response window.

Comment
  1. Mark Montgomery
  2. Thursday, 7 March 2024 14:17 PM UTC
Kevin,



Yes, the w_response window is opened via code. I have seen Chris Pollach's window manager code and that is certainly one path we're considering.



I really posted this just to see if anyone had any experience with noticing PowerBuilder not behaving well when some of their default functionality (i.e. application not doing anything while waiting for a response window to be dismissed) is "overridden" by outside forces.



Thanks,



Mark
  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.