Hello,
I started noticing quite some time ago (maybe in PB 12.5, maybe earlier) that PB stopped throwing an error when GetItemX datawindow method is called with row 0. Now, when it happened again in PB2019 R3, I decided to isolate the issue. I created a simple DW with an external data source, one string column "s", and data "ABC". I placed a DW control on a window, and wrote the following datawindow control clicked event script:
messageBox( 'Data in clicked', getItemString( 0, 's'))
When I run the window and click the DW, I get a nice message box:
If I misspell the column name, however:
messageBox( 'Data in clicked', getItemString( 1, 'sss'))
I still get the good old Invalid DW row/column specified error:
Of course, if both row and column are correct, I get "ABC":
messageBox( 'Data in clicked', getItemString( 1, 's'))
Does anybody know why this is happening?
Best regards,
Konstantin
Error behavior for strings is inconsistent with the other GetItem... functions. GetItemNumber does return NULL when no Dataobject is set and triggers a SystemError AND returns -1 for other errors, same with GetItemDecimal.