Page 2 of 2

Re: [Tip] Procedure "index" at the top of your source

Posted: Sat Dec 29, 2018 6:55 pm
by HanPBF
-

Re: [Tip] Procedure "index" at the top of your source

Posted: Sat Dec 29, 2018 7:59 pm
by Marc56us
skywalk wrote:How do you get the Issue Browser as a floating window? :shock:
Remove it from tools panel and open it from tools menu.

:wink:

Re: [Tip] Procedure "index" at the top of your source

Posted: Sat Dec 29, 2018 8:01 pm
by skywalk
I get it now. If you put Issues in the tools panel, floating window is not possible. :idea:

Re: [Tip] Procedure "index" at the top of your source

Posted: Sat Dec 29, 2018 8:05 pm
by Marc56us
Yes PB IDE tools can be opened via tools panel OR by tools menu but not both together

:wink:

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 1:59 am
by Dude
Bisonte wrote:Not really true.
I meant for blocks of code where you haven't used the ";-" comment style. In that case, it is true.
skywalk wrote:still a lot of dead typing.
I don't retype all my procedure names there; only the ones I use often. ;)

At the end of the day, when you have over 200 procedures and need to jump to a favorite one quickly, you simply can't beat this tip because there's no scrolling needed. That's what people here seem to keep overlooking. :shock:

Anyway, it works for me. Just thought it may be useful for others who also don't like scrolling through pages and pages of lists.

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 2:06 am
by skywalk
Yes, but I'm saying you can achieve the same with ;-! MyFavProcedure, immediately after the procedure. I select the procedure, hit [ctrl+d], then arrow left to insert ;-! and done.

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 2:35 am
by Dude
Skywalk, I don't understand. Say you've got 200 procedures and you want to instantly jump to procedure number 100, which might start at line 5000 of a 10000-line source. Assume your cursor is at line 7500.

With my tip, I literally hit Ctrl+Home then Ctrl+DoubleClick the procedure name, and bang, I'm at line 5000 in one second with no scrolling. The speed of source navigation this way cannot be understated.

How would I jump to line 5000 that quickly using your tip, if the cursor is currently on line 7500, and with no scrolling?

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 2:58 am
by skywalk
I'm relying on the Procedure Browser to do the jump for me.
I do not mark all my Procedures with the suffix ";-!" . Only critical ones or those I am debugging.

Try it and see.
I even further document my program's flow with:
;-!1 MyStep()
;-!2 MyStep2()
;-!3 MyStep3()
These appear in order in the Procedure Browser.

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 3:26 am
by Dude
I can't get it to work, Skywalk. :( Can you show a tiny snippet of what you're doing?

Also, I don't sort the Procedure Browser alphabetically as I prefer to see it the way the source actually is. Does that mean your method won't work?

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 4:59 am
by skywalk
Ah, I thought you might have missed that requirement I mentioned.
Naming conventions help and I add a ";-!" suffix to important areas of code.
These appear at the top of the Procedure Browser and in alphabetic order if selected in preferences.
I cannot make sense of my Procedure Browser without alphabetic order. :?
This is incredibly helpful, when you couple naming conventions with your Macros/Procedures.
I arrange the order of my Procedures to eliminate Declares, which I maybe have 2 in 100k lines of code.
Here is an example applied as a TODO list.

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 5:18 am
by Dude
Okay, thanks for clarifying. :)

Re: [Tip] Procedure "index" at the top of your source

Posted: Sun Dec 30, 2018 5:40 am
by Olliv
A small remark : choose the right procedure name.

ClassnameActSomeone()
ClassnameDoSomething()
etc...

GeneralModifyLocal()

i.e. :

ScreenGetWidth() what it could be read as a chapter title :

Screen : get the width

In this case, all the 200 procedures can be read on the panel. All is also alphabetical.

A second tip : export a class to an external source file.
In the way where a class seems to be rarely modified, there is no need to keep it in the main file.

Just keep two, three or fours classes in the main file.

Imagine you add Fred source code procedures (drawtext i.e.) : what would be the goal ?

A procedure you create, once created could be modified, but does not require to be read and controlled, again and again.

That was my remarks. But I appreciate such a dialog where a new idea is shared : I discover new (or less new) IDE options which cause new availabilities. Sure this tip has a place anywhere.

I think several preprocessing tools do not exist and the automatical access should be recalled to exchange several preprocess technics.