1. mike S
  2. PowerBuilder
  3. Friday, 18 November 2022 14:58 PM UTC

DataWindow Error
---------------------------
Line 71 Column 456: incorrect syntax.

 

how does the datawindow import error count line numbers?  It does not correspond to the line numbers in a text editor, pretty much a useless error message.  instead of saying what the syntax is that is in error, it provides numbers that don't match up with anything.

 

on a related note, it would be really really helpful if datawindow syntax additions between PB releases was published.  in the real world we have to use a newer IDE version while supporting older versions in production and often have to try and back migrate fixed/updated datawindows.  

John Fauss Accepted Answer Pending Moderation
  1. Friday, 18 November 2022 15:48 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Mike -

You have to take any "~r~n" and "~t" sequences into account when examining the DW source in a text editor.

Here's an example where I edited source and intentionally changed the syntax to something incorrect:

When I attempt to save from the source editor, I get the following (expected) error:

This is exactly where the editor cursor is located in the above snapshot... after "texxt".

This text DWObject is a two-line column label. It contains a "~r~n" sequence immediately after "Barcode Data" on source line 11, so this is why the editor places the remainder of source line 11 on editor line 12... the editor line beginning with "(Limit: 40 Characters)".

If I correct "texxt" to "text" and Save, I get a second error:

This error is caused by the misspelling of the keyword "color" as "colour". The "~r~n" sequence in the text label makes it appear in the editor that the error is in line 12, but syntactically, the error actually is in source line 11.

The same issue occurs to a slightly lesser degree with tab characters ("~t"). Tabs can artificially inflate the column number.

I obviously do not have a fix for this issue, but I hope it helps explain the apparent discrepancy.

Best regards, John

Comment
  1. Mark Goldsmith
  2. Saturday, 19 November 2022 15:23 PM UTC
Great explanation John! Even though PB syntax rules would agree with you, some of us might beg to differ that "colour" is incorrect, lol ;-)
  1. Helpful
  1. John Fauss
  2. Saturday, 19 November 2022 23:18 PM UTC
Ha! I knew that someone would call me out on that, Mark, I just didn’t know who it would be. Thank you for the feedback, it’s always great to hear from you!
  1. Helpful
  1. Roland Smith
  2. Monday, 21 November 2022 13:58 PM UTC
The object comment is stored at the top of the source in the PBL but then gets separated out when loaded into the painter/source editor.
  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.