Bug 3304

button in foreground doesn't fire buttonclicked event 14 January, 2022

mike S
07 September, 2019
Product: PowerBuilder Category: DataWindow
Version: 2017 R3 Build:
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Scheduling Reason:
Miguel Leeuwe 13 January, 2022
#19
Thanks for explaining Mike.
mike S 13 January, 2022
#18
@Miguel Leeuwe , no. buttonclicked works fine regardless of clicked coding in non-grid datawindows.  

the bug is grid datawidnows, and i believe that PB doesn't 'see' the button when the clicked event(s) are run.  Maybe not ever, but also maybe just when the button gets moved either via the user moving the column (column moving is on since that is the only reason to have grid datawindow) AND/OR using modify to move the grid columns to restore the user's prior column position and sizes.

The clicked event's dwo.name shows the underlying column/compute field NOT the button.  getobjectatpointer() returns the correct object however.  It does sometimes work, but it is randomly working.  Things like enabled for the button would have to be checked, but getobjectatpointer seems like the only viable work around. Either that or create a fake button out of a compute - which i also do a fair bit.

Also in this particular case, the button is in the detail band, not the foreground.  

Buttons and grid datawindows just don't work the way they are supposed to.    

The grid datawindow needs a complete overhaul.  So many things about it that were poorly done.
Miguel Leeuwe 13 January, 2022
#17
FYI: I'm sure you guys know this, but wasn't there a behavior meaning that your code in buttonclicked() would not fire if you had also coded the clicked() event? Or is this old news and has been fixed in the last years?
Just wondering if it could have something to do.
Ken Guo @Appeon 13 January, 2022
#16
i mike,

Thanks for sharing the info for this issue with us.

As far as I know, the development team doesn’t have a plan to fix this bug at this moment so I suggest you try to work around this issue when coding.


Regards,
Ken
mike S 12 January, 2022
#15
now in PB2019R3:

working on another grid dw and the button NEVER fires.  I can work around it by using:  
getobjectatpointer

which is able to report the correct object.  

The clicked event DOES fire but it reports the wrong object (the one underneath the button).  the buttonclicked even of the datawindow control does not fire.  

This is a grid datawindow, and moving the button (and underlying column) using modify seems to be why it isnt't tracking things correctly.
Ken Guo @Appeon 26 August, 2020
#14
Hi Mike,

Sorry for the inconvenience this bug caused.
I will transfer this bug to the developers to further analysis.

Besides, every version of Appeon PB 2017 and PB 2019 will implement some new functionalities and fix some important bugs (including the Sybase legacy bugs).


Regards,
Ken
mike S 25 August, 2020
#13
"Move down the column after the button a little bit to make sure they won’t be stacked together."
It seems that to work you can ONLY click the part of the button that does NOT overlap the column.  I took off the tab value (set to zero), but that didn't make a difference either.  Only when i clicked the non-overlapping part of the button.  My guess is that it was a crappy implementation by sybase when they finally added the datawindow button.  

My typical use case for buttons is to put them on top of a compute field which does work fine (mostly).  However, i have a situation where the button will enable a column to be editable and the only time a user should click the button is when the column is NOT editable (so i hide the button after clicking).  So having the button on the column makes sense and this stupid limitation is getting in the way.

Buttons on grid datawindows, and really grid datawindow in general, need to be worked on.  I know you guys don't actually do any real pb development otherwise things like this would already be known and fixed
Ken Guo @Appeon 25 August, 2020
#12
Hi Mike,

Thanks for reporting this problem! We reproduced it on our end and will do further research to figure it out. We will keep you posted on the progress.

BTW, PB 12.6 has the same issue as well.
And we’d suggest you try the following workaround:
Move down the column after the button a little bit to make sure they won’t be stacked together.

Regards,
Ken
armando.herrera 24 August, 2020
#11
Hi, 

Thank you very much for your news. 
We are working on it and we will get back to you after analyzing it.

Regards!
mike S 24 August, 2020
#10
2020-08-24 12-28-08.zip (3596KB)

attached is a video that sort of shows the problem.  the video capture software doesn't switch between PB and the app, so you don't see that i am clicking the button.
armando.herrera 02 June, 2020
#9
Hi Mike,

Based on our policy we have made 3 different attempts to contact you and determine if this ticket has been solved unfortunately, we did not get any response and we proceed to close it. 

If you consider this issue is still not fixed please, contact us.

Regards!
armando.herrera 28 May, 2020
#8
Hi Mike, 

We have been trying to keep in touch with you to find out about the resolution of this issue. 


We would like to continue with our support but without more information, we will need to close it in the next 3 working days, according to our internal help support policy but please remember you can always open a new ticket.   


Regards.
armando.herrera 21 May, 2020
#7
Hi Mike,
  
I'm just touching base with you about this ticket. 

Did we provide you with enough information to resolve this issue or have you resolved this issue?.

Please let us know if there is something else to support you with?. 

Regards!
armando.herrera 27 April, 2020
#6
Hi Mike, 

I'm checking if you were able to reproduce this case?. Can we help you with something else?. 

Otherwise, please let us know if can we proceed to close this ticket?.

Keep in mind, that you are always welcome to open another ticket in case you want to report another bug.

Regards!
armando.herrera 18 March, 2020
#5
Hi Mike,

It has been a while since we heard from you!. 

Are you still facing this problem?. 
Is there anything we can do to keep helping on this issue? 

Regards!
Ken Guo @Appeon 11 September, 2019
#4
Hi Mike,

Can you provide a reproducible simple test case (with PBT/PBL)? This would help us to analyze the issue. Thanks for your understanding!

Regards,
Ken
mike S 09 September, 2019
#3
and now it doesn't work again.
   the button clicking and buttonclicked events do not fire.
the clicked event does fire, and a field name is being seen as clicked.

the datawindow has a large field/column on it and that field has autosize height set on and is the size (height and width) of the entire datawindow.
mike S 09 September, 2019
#2
ooops, i guess i wasn't clicking hard enough......  

thanks, you are correct.

I can reproduce the clicking not 'taking' but it is a situation when i clicked near the edge of the button and possibly moved the mouse out of range when the button came up.
Ken Guo @Appeon 09 September, 2019
#1
Appeon Test Case

Hi Mike,

I created a small case and when the button is clicked, the buttonclicked event can be triggered successfully. Please see the attachment for details.
I can’t replicate the issue you mentioned. In this case, please provide a reproducible case for us so that we can help you deal with it.

Regards,
Ken
mike S 07 September, 2019
*Phenomenon:
datawindow button clicked event does not fire if the button is in the foreground

*Reproduce Steps:
add a button to a datawindow.   change the button's position to foreground in the datawindow painter.  code the datawindow control's buttonclicked event to do something when the button is clicked.  the button clicked event does not fire if the button is in the foreground


Remarks:
OS:
All
Platform:
Database Type:
Database Version: