1. Thierry Del Fiore
  2. PowerBuilder
  3. Tuesday, 15 March 2022 09:34 AM UTC

HI,

migrated from PB2019R2 to R3 (with theme PB)

we noticed that Windows are visible before open event ends, it doesn't seem to be the case in previous versions.

So we see, the resize, the centering of the window

More annoying, in reports where there are setitem, insert, rowscopy,   compute are reevaluated -> so we have performance issue since the window is visible.

So we had to play with window.visible and dw.setredraw() in the open event.

Is this a normal behaviour ?

Still the same in PB2021 ?

best regards

 

 

 

 

Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 15 March 2022 16:54 PM UTC
  2. PowerBuilder
  3. # 1

// OPEN event
// -----------------

this.SetRedraw (FALSE)


.... your code....


this.SetRedraw (TRUE)
RETURN


If you have a preopen event, as in the PFC, you can put the this.setRedraw (FALSE) iat the top of the preopen event and the setRedraw (TRUE) at the end of the postopen event, if you wish.

 

Comment
  1. Thierry Del Fiore
  2. Wednesday, 16 March 2022 08:02 AM UTC
Thanks, i was just wondering why this change in the open behaviour and also if it was still present in pb2021.

  1. Helpful
  1. Olan Knight
  2. Wednesday, 16 March 2022 15:53 PM UTC
As far as I know the window in PB has always been made visible at the start of the OPEN event.

How fast the window is redrawn and actually becomes viewable by the use depends on the code in the background; if you have a lot of pre-ready-for-the-user-to-interact-with-the-window code, then it's quite possible that the window will be fullt redrawn before the OPEN script(s) have completed.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 15 March 2022 13:39 PM UTC
  2. PowerBuilder
  3. # 2

Hi Thierry;

  FWIW: My STD Framework was designed a long time ago to have all ancestor Window classes invisible. It then uses an "oe_PostOpen" user event to then make the concrete level window visible once the real Open event code has been processed. This has always worked well for many decades across various PowerSoft, Sybase, SAP & now Appeon PB releases. The premise of why I did it that way is that often between releases event firing order & timings changed over PB releases (even way back when). So I wanted a way to smooth out the instantiation process across all Apps so that it would look uniform to the App users.

Food for thought. However, I am not trying to make excuses for the current change behaviour.

Regards ... Chris

 

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