1. Gérard MORVAN
  2. PowerBuilder
  3. Thursday, 18 July 2019 13:02 PM UTC
 

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

Who is viewing this page
Accepted Answer
Aart Onkenhout Accepted Answer Pending Moderation
  1. Thursday, 18 July 2019 13:09 PM UTC
  2. PowerBuilder
  3. # Permalink

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

Comment
  1. Eduardo G.
  2. Friday, 19 July 2019 09:57 AM UTC
???
  1. Helpful
  1. Gérard MORVAN
  2. Thursday, 25 July 2019 15:36 PM UTC
Hi Eduardo G.

What does "???" mean please ?
  1. Helpful
  1. Sivaprakash BKR
  2. Wednesday, 4 August 2021 11:57 AM UTC
May be an option in the upcoming PB 2022 with new and modern editor ...
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 4 August 2021 08:31 AM UTC
  2. PowerBuilder
  3. # 1

This sounds like a great feature request for product@appeon.com or by posting it as a feature request on the support site:

https://www.appeon.com/standardsupport

 

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 15 August 2019 10:31 AM UTC
  2. PowerBuilder
  3. # 2

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.
Roland Smith Accepted Answer Pending Moderation
  1. Saturday, 10 August 2019 21:01 PM UTC
  2. PowerBuilder
  3. # 3

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

 

Comment
  1. André Monz
  2. Tuesday, 13 August 2019 11:54 AM UTC
Yes, i miss folding in PB-Classic every day.

At least copy'n paste is supported :-)
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 4 August 2021 08:29 AM UTC
LOL!
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 4 August 2021 08:30 AM UTC
(until you use 'autocomplete', then your copy is gone!)
  1. Helpful
There are no comments made yet.
Noel Hibbard Accepted Answer Pending Moderation
  1. Friday, 9 August 2019 20:38 PM UTC
  2. PowerBuilder
  3. # 4

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
  1. Noel Hibbard
  2. Friday, 9 August 2019 21:13 PM UTC
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. Helpful
  1. Noel Hibbard
  2. Friday, 16 August 2019 18:45 PM UTC
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. Helpful
  1. Ankur Patel
  2. Wednesday, 4 August 2021 07:49 AM UTC
Hello Noel,



Did you ever get time to write that documentation for this. Also is it possible to share the command line C# app that you created with the community?
  1. Helpful
There are no comments made yet.
John Niespodzianski Accepted Answer Pending Moderation
  1. Friday, 9 August 2019 18:49 PM UTC
  2. PowerBuilder
  3. # 5

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.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 18 July 2019 15:28 PM UTC
  2. PowerBuilder
  3. # 6

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.
  • Page :
  • 1


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