1. Tomas Beran
  2. PowerBuilder
  3. Thursday, 1 December 2022 18:48 PM UTC

Hi

I'm investigating a new strange behavior of PB2022. I've never seen it in previous PB versions. It looks like

computed.expression='0.7' is sometimes interpreted as '0'. It looks like the part after the dot is cut off. Regular columns are not affected. Only computed fields.

It seems to be dependent on combination of user's locale, global locale and default non-unicode character set and such internal state of the computer.

It's happening randomly but when it starts happening it's there until the computer restart.

I'm working on it but currently I'm not able to create a minimal proof.

Code:

decimal ld_ret
datastore luo_store
luo_store = CREATE datastore
luo_store.dataobject="d_expr_bug"
luo_store.InsertRow(0)
luo_store.Modify("create compute(band=detail x='8' y='8' height='56' width='178'  name=test expression='0.7')")
ld_ret = luo_store.GetItemDecimal( 1 , "test" )

ld_ret should be 0.7 now. But sometimes it's 0.

 

It may be a DLL mismatch. But I've checked pbdwe dependency and it looks OK.

 

Have you seen this or similar bug?

 EDIT: Tested on 1892. I see there's a new version there so I will check it tomorrow.

Tomas Beran Accepted Answer Pending Moderation
  1. Wednesday, 15 February 2023 14:10 PM UTC
  2. PowerBuilder
  3. # 1

Solved with bug 9475 https://www.appeon.com/standardsupport/track/view?id=9475

I'm closing this topic.

 

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 16 February 2023 03:06 AM UTC
Thanks for testing the new version and sharing your feedback!
  1. Helpful
There are no comments made yet.
Tomas Beran Accepted Answer Pending Moderation
  1. Tuesday, 13 December 2022 15:03 PM UTC
  2. PowerBuilder
  3. # 2

I think I've isolated the case. I'm opening a ticket

https://www.appeon.com/standardsupport/search/view?id=9475

 

Comment
There are no comments made yet.
Roy Bungert Accepted Answer Pending Moderation
  1. Friday, 9 December 2022 09:10 AM UTC
  2. PowerBuilder
  3. # 3

In this context I want to mention another strange behavior with the editmask control and decimal values. Perhaps there's a common reason or it helps to find a solution.

Since years we used the following in of our windows:

Editmask control with mask: ###,###.00 and MaskDataType "numericmask!"

We never had a problem with decimal values!

Since Powerbuild 2022 (1892) some customers report that everything is ok with entering decimal values, but from one moment to another they can't use decimal values in this fields anymore. They enter the value "12,23" and at the moment when they leave the field, the value of the field is changed to "12,00". It's not a display issue, the value of this field is changed to "12,00", too. Strange: When the user restarts the application it's okay for some time (sometime hours) until the error happens again suddenly.

We solved the issue  by using "decimalmask!" as the MaskDataType - which is actually the right configuration entry for that. But it was ok with "numericmask!" until Powerbuilder 2022 (1892). The old versions of Powerbuilder accepted this wrong coding. And PB2022 accepts it too until a certain point. The strange thing is that this error is hard to reproduce. It never happened on my computer (Windows 11) in the IDE and not as EXE. 

More information: German environment with "," as decimal separator. Until now the OS of the customers who reported the issue was Windows 10.

Regards

Roy

 

 

 

 

Comment
  1. Tomas Beran
  2. Monday, 12 December 2022 12:58 PM UTC
My idea is wrong. Today the bug was reported again.
  1. Helpful
  1. Roy Bungert
  2. Monday, 12 December 2022 14:22 PM UTC
Yes, I just checked it with our customers. No AVG.

I hope that the Appeon people will find a solution
  1. Helpful
  1. Jober Campos
  2. Thursday, 31 August 2023 16:44 PM UTC
I have same problem after migrate application of pb 11.5 to 22(build 1900). At any moment objects editmask control with mask: ###,###.00 and MaskDataType "numericmask!" present the situation. Changing for decimalmask solve the issue.
  1. Helpful 1
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 9 December 2022 07:15 AM UTC
  2. PowerBuilder
  3. # 4

Hi.

Can you try to set format? I guess I have left it to general.

What I would do is:

Example of computed field expression: 1.5 * getrow().

Now in format I would code an expression as follows:

if(truncate( compute_1, 0 )<>compute_1, "###,###,###.##", "###,###,###")

I wonder if you still see the issue.

Also, while I do this in my previous example and in many other occasions :-(, I believe that when possible we should avoid leaving our scripts to decide for datatypes to be used.

Andreas.

Comment
There are no comments made yet.
Tomas Beran Accepted Answer Pending Moderation
  1. Tuesday, 6 December 2022 17:47 PM UTC
  2. PowerBuilder
  3. # 5

The strange behavior continues.

When it starts to happen then it's omnipresent. Surprisingly I started my app in PB and ëven this bug is rare it happened! After I found the bug is active I closed my application and tried to create a new external datawindow. And the bug continues in PB IDE. Check the attached printscreen

 

 

Attachments (1)
Comment
  1. Tomas Beran
  2. Tuesday, 6 December 2022 17:57 PM UTC
Knowledge: Switching workplace clears the bug.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 1 December 2022 19:49 PM UTC
  2. PowerBuilder
  3. # 6

Hi Tomas;

  As a workaround ... Have you tried breaking down the one Modify() command into two Modify() commands. One for the Compute & one for the CC's expression value modification?

Regards .... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 6 December 2022 21:57 PM UTC
Hi Tomas;

You need to use the ~t in the Modify() command. For example:

modstring = "emp_id.Color='16777215 ~tIf(emp_status=~~'A~~',255,16777215)'"

HTH

Regards ... Chris
  1. Helpful 1
  1. Tomas Beran
  2. Thursday, 8 December 2022 18:26 PM UTC
Hi Chris

Sorry but I don't understand you.

You wrote:

"When you create a CC in the DW Painter graphically - you will see that all expressions are optional (not required)."

How can I do it?

If I click OK I get error:

---------------------------

DataWindow

---------------------------

NULL expression is not valid.

---------------------------

OK

---------------------------



If I click Cancel then the column disappears.



Am I overlooking something? There may be some setting in PB which allows me empty expressions but I don't know about it. And I remember expression has been required since PB 5.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 8 December 2022 22:35 PM UTC
The example I gave above would be done in the modify() command. It does NOT change the object property's value. Instead anything past the "~t" just adds / changes the expression dynamically for that column's property at runtime.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.