1. Sivaprakash BKR
  2. PowerBuilder
  3. Sunday, 17 November 2019 06:26 AM UTC

Hello,

PB 2017 R3.  Sample project attached in a zip file.

We do not have the facility of 'AUTO SELECTION' for Date Field with Edit Mask, as available for String fields.  So in Itemfocuschanged event we write code to make AUTO SELECTION.

When a short-cut key is pressed (Ctrl + S), when the focus is on date field, the value gets cleared.  This issue is not there when the focus is on a Text field.

What could be reason for this issue ?  

Happiness Always
BKR Sivaprakash

 

Attachments (1)
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Monday, 18 November 2019 10:56 AM UTC
  2. PowerBuilder
  3. # 1

It's a bug.  Seems it exists in Pb 12.6 as well.

 

Hi Sivaprakash,

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 about the progress.

BTW, PB 12.6 has the same issue as well.

Regards,
Ken


 

Comment
  1. Michael Kramer
  2. Monday, 18 November 2019 12:57 PM UTC
EditMask was always is the "odd one off" in PowerBuilder. More fragile having more bugs than the other controls. It has always been hard to customize when users require non-standard behavior. I guess too much happening inside the control itself. So either you accept its default behavior - or you write something yourself starting with another Edit Style (inside a DW) or another control (outside a DW).

My 2 cents of wisdom from struggling with EditMask since PB3 /Michael
  1. Helpful
  1. Sivaprakash BKR
  2. Tuesday, 19 November 2019 04:39 AM UTC
Any other idea to accept date, in a desired format, without using editmask ?
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 18 November 2019 06:27 AM UTC
  2. PowerBuilder
  3. # 2

It's not just Ctrl+S. I get similar behavior to the date column in the second (string) data column if I change the edit style to Edit Mask using a mask of "XXXXXXXXXX" (any ten characters) and delete nearly all of the code in the ItemFocusChanged event except for SelectText(1,99999) and delete the DW user event mapped to pbm_dwnkey , then press Ctrl plus any key (although I did not try all possible keys). I tested with PB 2017 R3 Build 1858.

I agree with Miguel this is likely a bug involving the Edit Mask edit style.

Comment
  1. Miguel Leeuwe
  2. Monday, 18 November 2019 08:33 AM UTC
I commented ALL code except for the change of focus to test, assigned a date instead of a datetime (open event) changed the format to [general] / [shortdate] / 'dd/MM/yyyy' to 'dd/mm/yy', etc ... and with these settings a simple "manual selection of the text in the date field., using the mouse to do so, it already fails. It definitely is a bug.
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 18 November 2019 08:34 AM UTC
Ah, so it fails with probably any selected text in any mask !!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 17 November 2019 23:46 PM UTC
  2. PowerBuilder
  3. # 3

I've tested your sample application and after taking out everything that I thought might interfere, it still happened and it's simply a bug (I've tested on Pb2019 R2 beta). When the text is selected and you do ctrl+S it's set to 00/00/0000.

The funny thing is that when you run in debug-mode on the setfocus, everything works fine.

You should report this as a bug I think. Thank you.

HIH

Comment
  1. Sivaprakash BKR
  2. Monday, 18 November 2019 05:17 AM UTC
Thanks Miguel Leeuwe,

Filed a bug report, No. 3633.
  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.