Bug? Can't navigate to Bookmarks in a different file within same project

JohnC

Well-Known Member
Licensed User
I just started programming in B4A again after a little time off working on another project.

I was using the new bookmark feature in B4A 6.3 for some work I was doing within the same file.

But, then I added some bookmarks to another file of the same project, and I was unable to use Alt-PgUp or Alt-PgDn to jump among all the bookmarks - it seems I can only jump around bookmarks in the same file.

This must be a bug because only being able to jump to bookmarks in the same page and no where else in the project seems counterproductive to the purpose of bookmarks.

Please let me know if I am doing something wrong.
 

Widget

Well-Known Member
Licensed User
That's how bookmarks are suppose to work. They don't jump from file to file. How would it know which file to jump to next?

If you want to "jump" to another file in the project, Press Ctrl-Tab and select a file in the project. If you want to jump between 2 most recently used files, just Press Ctrl-Tab and release.

Of course you also have Alt-Left and Alt-Right to navigate back and navigate forward (see blue arrow icons in toolbar). This will traverse all files in the order they were accessed.

Hope this helps.
 

JohnC

Well-Known Member
Licensed User
That's not how bookmarks worked in VB6 and they certainly don't work that way in ANY of the Visual Studio.NET editions when a project had multiple files in it.

It's common practice to have multiple files in the same project and have code from one file call a routine from another. So there is often the need to work on code in two different files for a given task, and the common practice is to have multiple bookmarks related to the task at hand and be able to use the main feature of bookmarks so you can jump around ALL of them no matter what file (of the same project of course) they are in and thats where you can be productive without having to select a file first before you can select a bookmark.
 

Widget

Well-Known Member
Licensed User
All I can say is Delphi's bookmarks work the same as B4A. Traversing the bookmarks are local to the current file and don't jump from file to file.

It's common practice to have multiple files in the same project and have code from one file call a routine from another. So there is often the need to work on code in two different files for a given task,
Editor Tips:

Have you tried this?
Find All References
1) Put the cursor on the procedure name (or identifier) and press F7 to see all references to it in all files.
2) Click on the line in the "Find All References" window to jump to the line in any file.
3) You can then use Alt-Left and Alt-Right to move back and forth through the files to see the lines you just accessed.

Split Editor Windows
If you need to access 2 regions of the same file, the B4A edit window can be split into 2 parts, either vertically or horizontally.
To split the editor into 2 regions horizontally, move the mouse over the very top right of the vertical scroll bar and the mouse cursor changes into a double arrow. Click and drag it down to open up the split window.
To split the editor vertically, move the mouse over the left most part of the bottom horizontal scroll bar and the mouse cursor changes into a double arrow. Click and drag it to the right to open up a split window.

Floating Editor Windows
If you have more than one monitor (or you have a large monitor), you can drag one of the tabs in the editor to another monitor to see the contents of both files at the same time.

Docked Editor Windows
You can also drag the floating window (created above) and redock it to the top of the tabbed editor windows so you have one file displayed at the top and another file displayed on the bottom (or one on the left and one on the right). This can be repeated as many times as you like. For example, you can have the editor display 4 files on the screen at a time. If you now click on the line in "Find All References" pane (created using F7), the editor window containing that file will jump to the line you just clicked on.

My Special "Bookmark" Tags
I add comments prefixed with "'##" as in "'##<TAG>" where "<TAG>" is any string you like. Now I can do a Find (Ctrl-F) on "##" to find all of my special bookmarks, or I can narrow it down and search for a specific special bookmark tag like "##TODO" and it will find all of my lines with "##TODO" like "##TODO:Add exception checking to code.". This allows me to jump to specific tags in the files quite quickly. I often find this better than using bookmarks because I can quickly find all references with comments that have this special tag.

Hope this helps.
 

JohnC

Well-Known Member
Licensed User
Yes I did, and those were the ways everyone was suggesting as a work around for not having the bookmark feature at all.

But, now that a bookmark feature has been added, there should be no need for any work arounds.
 

Erel

Administrator
Staff member
Licensed User
That's not how bookmarks worked in VB6 and they certainly don't work that way in ANY of the Visual Studio.NET editions when a project had multiple files in it.
B4X is not VB6 nor Visual Studio.

This is not a bug. You can make a feature request if you like to be able to jump to bookmarks in other modules. I don't know whether it will be implemented.
 

JohnC

Well-Known Member
Licensed User
Hi Erel,

Because your whole user base comprises mainly VB programmers, I'm thinking that 90%+ of them mainly use VB6 or VB.NET as their primary programming IDE for non-native mobile projects. Am I really way off with this assumption?

That's why I am confused why you wouldn't want your IDE to feel and operate as similar as possible so there is a minimal learning curve to using your IDE.

I will post a feature request for global bookmarks and global find/replace to be more consistent with Microsoft's IDE's :)

The bottom line is that adding support for global bookmarks and global find+replace will not cause any loss of productivity - it can only enhance it for your users.
 
Top