Bug 4102

WorkSpaceX() and WorkSpaceY() return 0 on MDIframes that contain userObjects 08 June, 2021

Yiannis Papadomichelakis
14 February, 2020
Product: PowerBuilder Category: Controls & UI
Version: 2019 R2 Beta Build:
Classification: Issue Publishing: Public
Priority: P3
Status: Closed Reason: NO RESPONSE
Chris Pollach @Appeon 08 June, 2021
#8
Hi Yiannis;

  We have tried to reach you now 3 times. In accordance with our support policies since there has been no reply, we are closing this ticket.

  Please feel free to open a new ticket if in the future, this is still a reproducible issue.

Regards ... Chris
Chris Pollach @Appeon 07 June, 2021
#7
Hi Yiannis;

  We are trying to reach you to determine if the information that we gave allowed you to solve your issue? 

Regards ... Chris
Chris Pollach @Appeon 04 June, 2021
#6
Hi Yiannis;

 Please try the latest PB2019R3 build 2703 and see if your space calculation issue has been resolved. Also, R3 is the LTS (Long Term Support) edition as well. So getting support on this release will be much better as R2 is almost at EOL.

Regards ... Chris
Yiannis Papadomichelakis 17 February, 2020
#5
(In reply to Chris Pollach from comment #4)
Hi Yannis;

 The consideration in implementing this in the Resize event is that the PB
run-time and O/S during the Window instantiation process can call (fire) the
resize event multiple times. Each time it fires, the events argument values
can be misleading until the Window class is full instantiated.

Regards .... Chris
...but I suppose I have to implement it somewhere, if not on resize event, then where? The event arguments maybe misleading, but I suppose they will be right in the last time. Since I want WorkSpaceX() in order to calculate the correct position of the popup (Bug 4098), I created a fake mdi window, I open it once, calculate the difference and close it. It’s a onetime calculation for me, so I found my workaround. But I really think it’s a bug.
Chris Pollach @Appeon 14 February, 2020
#4
Hi Yannis;

 The consideration in implementing this in the Resize event is that the PB run-time and O/S during the Window instantiation process can call (fire) the resize event multiple times. Each time it fires, the events argument values can be misleading until the Window class is full instantiated.

Regards .... Chris
Yiannis Papadomichelakis 14 February, 2020
#3
I agree with you, I did resize and reposition the mdi_1. 
Did you find anything suspicious in the resize event of w_mdi_2, that can case such behavior?
Chris Pollach @Appeon 14 February, 2020
#2
Hi Yannis;

  That would be correct as this breaks one of the cardinal rules of MDI ... Never, never ever and if in doubt never, place an object (ie Control) on the surface of an MDI Frame window. Either statically via the Window Painter or Dynamically via the OpenUserObject() command. In essence, it must always be clear of any controls. 

  An exception to the above rule is ... "only if your PowerScript code competently move and resize MDI_1 as so that it does not interfere with the control(s)! However, this can be very tricky to code.

  Breaking the above rule ... inappropriate MDI Frame behaviour will occur. This can be a mild visual inconsistency or all the way up to a complete & unrecoverable GPF.

HTH
Regards ...Chris
Yiannis Papadomichelakis 14 February, 2020
#1
WorkSpaceTest.zip (11KB)

*Phenomenon:
When the MDIFrame contain a userobject (eg a custom status bar), workSpaceX() and WorkSpaceY() return zero, instead of the actual coordinates from the top of the screen. WorkSpaceWidth() and WorkSpaceHeight() works normally.

*Reproduce Steps:
In the attachment, the app opens MDI frame windows. w_mdi_2 is inherited from w_mdi_1 and the only difference from it is the user object on its surface and the appropriate code on it’s resize event.
The w_sheet is opened by both windows and it displays the WorkSpaceX() and WorkSpaceY() of it’s frame.
When opened from w_mdi_1, both functions return a non-zero value.
When opened from w_mdi_2, both functions return zero.
OS:
Windows 10
Platform:
Database Type:
Database Version: