1. Gérard MORVAN
  2. PowerBuilder
  3. Thursday, 18 July 2019
 

I have recently upgraded from Powerbuilder 12.5 to PowerBuilder 2017. I know that the current line number (and column) is given at the bottom of the screen but can the line numbers be given next to each line?

Various Powerbuilder settings, looking on the net, and finding some useless answers.

IF X <> Y THEN
X = Y
END IF

I would rather see:

10 IF X <> Y THEN
20 X = Y
30 END IF

Thanks for your answers smile

Accepted Answer
Aart Onkenhout Accepted Answer Pending Moderation
0
Votes
Undo

There's no possiblity to show linenumbers. Waiting for it too (since 1993 cry).

Comment
Many Thanks Aart !!
  1. Gérard MORVAN
  2. Thursday, 18 July 2019
???
  1. Eduardo G.
  2. Friday, 19 July 2019
Hi Eduardo G.

What does "???" mean please ?
  1. Gérard MORVAN
  2. Thursday, 25 July 2019
There are no comments made yet.
  1. Thursday, 18 July 2019
  2. PowerBuilder
  3. # Permalink
Roland Smith Accepted Answer Pending Moderation
0
Votes
Undo

My PBEditor example uses Scintilla, the same editor control that Notepad++ does.

http://www.topwizprogramming.com/freecode_pbeditor.html

 

Comment
There are no comments made yet.
  1. Thursday, 15 August 2019
  2. PowerBuilder
  3. # 1
Roland Smith Accepted Answer Pending Moderation
1
Votes
Undo

What we really need is folding at IF/ELSE/END IF and CASE WHEN.

 

Comment
Yes, i miss folding in PB-Classic every day.

At least copy'n paste is supported :-)
  1. André Monz
  2. Tuesday, 13 August 2019
There are no comments made yet.
  1. Saturday, 10 August 2019
  2. PowerBuilder
  3. # 2
Noel Hibbard Accepted Answer Pending Moderation
0
Votes
Undo

If you can't do it in Notepad.exe, don't expect to be able to do it in PB's IDE. Actually Notepad.exe is more advanced in some ways than PB's IDE. I'm super bummed there is literally nothing in the roadmap for the PB Script editor.

We are migrating to PB2019 and Git right now and I've worked out a way to edit source in VSCode and then run a Task with a hotkey that compiles the current file and updates the PBL with a simple hotkey. If there are compile errors it integrates with VSCodes problem solver and highlights underlines the bad code in red and shows the tick marks in the scrollbar. So at least now I have a way to go between the PB IDE and VSCode without jumping through hoops. There is also a PB extension for VSCode that does syntax highlighting at least:
marketplace.visualstudio.com/items?itemName=florianbaer.pb-syntax

 

Comment
Sounds nice, can you give us some more information about that your way to edit source in vscode and that task to compile/update the PBL ?
  1. Tobias Roth
  2. Friday, 9 August 2019
Well first of all when you enable source control in PB2017/19 it exports all the source to a folder named ws_objects. For example:

ws_objects/some.pbl.src/somewindow.srw



Anytime you edit something in the PB IDE these raw source files are instantly updated. The problem is it doesn't work the other way around. If you edit a source file outside the IDE it doesn't automatically see the changes and update the PBL.



So I found this project called pborca which is similar to the official orca script but will allow you to compile a single source file into a PBL which isn't something that you can do in the official orcascript:

https://code.google.com/archive/p/pborca/



I wrote another program in NodeJS that dynamically generates a script and then calls this program to compile the object I am currently editing. The problem is the line numbers that are returned are relative to the script itself and not the raw source of the whole object. To work around this I take the errors and then parse the raw source to find the actually line number within the source and then return my own errors which are then easy to pick up with a problemMatcher regex in VSCode. I want to write my own utility so I can drop the dependence on pborca and then I will probably release something. Until then it's too much of a cluster F to release.



Another simple option is to just open the ws_objects folder in VSCode and after changing the source go back to the PB IDE, right click on the object you changed and select refresh and it will compile the source but if it doesn't compile it just tells you to F off with no details on what it doesn't like. So it isn't a practical solution. You could also just Ctrl+A/C/V back and forth between the PB IDE and VSCode or any other editor more modern than Notepad.exe.
  1. Noel Hibbard
  2. Friday, 9 August 2019
Just to follow up on this. I wrote a command line app in C# that calls the pborca dlls to handle the compilation of a source file and when there are errors it spits out error message along with the line number within the raw source (not within script). The output from my program is easy to pick up with a VSCode problemMatcher. I built in support for PB2017 and PB2019 although I've only tested it with PB2019. I need to do some more testing to make sure my parsing logic doesn't have any bugs but after I think it's good to go I will write up some documentation on how to configure VSCode to call it.

One other thing I want to add to is is the ability to check to see if you have a painter open for the object you are trying to compile and if so abort the compile with an error telling you to close the painter. I should be able to handle this with user32.dll.
  1. Noel Hibbard
  2. Friday, 16 August 2019
There are no comments made yet.
  1. Friday, 9 August 2019
  2. PowerBuilder
  3. # 3
John Niespodzianski Accepted Answer Pending Moderation
0
Votes
Undo

Offering in case you don't know this shortcut -- CTRL-SHIFT-G will allow you to jump to a specific line when editing PowerScript.  Useful when you're researching an issue that references a specific line # in a given event or function.

Comment
There are no comments made yet.
  1. Friday, 9 August 2019
  2. PowerBuilder
  3. # 4
Olan Knight Accepted Answer Pending Moderation
0
Votes
Undo

If having line numbers in the IDE editors becomes a reality, I most certainly hope that there is an option to ENABLE and DISABLE that feature!

Sometimes the line numbers are useful, usually they are just clutter.


Later -

Olan

 

Comment
There are no comments made yet.
  1. Thursday, 18 July 2019
  2. PowerBuilder
  3. # 5
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.