Recent

Author Topic: Browse button/screen in Compiler Opts could be more useful  (Read 3742 times)

Philcha

  • Newbie
  • Posts: 3
Browse button/screen in Compiler Opts could be more useful
« on: March 23, 2008, 03:49:16 pm »
I use Windows XP; I don't know whether my comments apply to other OSs.

At present I find the "Browse" button and screen in "Compiler Options" are not at all useful. Suppose I try a Quick Compile and it says "cannot find unit X".  As far as I can see nothing in Lazarus is useful for finding "unit X". In particular the "Browse" screen shows only a list of folders / directories with no indication of what they contain.

Suggestions, based on how I actually search for units and include files (see below):
  • Make the "Browse" screen remember its position in folder tree when it was last used in the project for each type of search (units, includes, etc.).
  • For new projects (assuming that the user does not copy "Compiler Options" from a previous project), make the "Browse" screen start where it was last used for the same type of search (units, includes, etc.). This has to be more useful than starting at "My Computer".
  • Make the "Browse" screen start with the size at which it was last used. The current default size is far too small - just try clicking  a large downloaded sub-tree, e.g. JEDI-SDL or ......\fpc\n\source\rtl!
  • Make the "Browse" screen start in its last position on the screen - if I use it repeatedly  in a project and it opens at a decent size, it's so far down the screen that I have to move it in order to use its buttons.
  • Make the "Browse" screen able to show the contents of a folder (files and sub-folders).
  • Add an option that with a similar screen to "Find in Files" but showing also the path and filename. Clicking the found text should display the file; clicking the path should add it to the relevant part of "Compiler Options".

The nice thing about the path forms in "Compiler Options" is that the contents are standard Windows textboxes, I can copy and paste them (Ctrl-C, Ctrl-V). I very soon found that the quickest way round "cannot find unit X" was to use Windows Explorer and to copy the path from Windows Explorer's Address bar to the textbox in "Compiler Options". I use a few variants of this approach, and only 1 of these sometimes involves the "browse" button:
  • Often it's fairly obvious from a scan through the contents of folders which .pas file contains the unit, because there's a .pas file with the same name. Then I just copy and paste the path.
  • If it's less obvious which .pas file contains the unit, I can use Windows Explorer to search for the text "X unit;" Since Windows Explorer's search output is not a standard Windows textbox I can't copy text from it. So this is a case where I could use the "Browse" button and screen to select the folders that Windows Explorer has found. But I usually find it more convenient to keep 1 or 2 additional Windows Explorer windows open and positioned at about the right locations in the folder tree. This is particularly true if I'm hopping around a bit.
  • For include files I usually use the 2nd approach: use Windows Explorer to search for the missing identifier, etc.

Background:  This is based on my experiences of trying to compile the demos in Stojkovic's "SDL Controls" (I'm a fairly experienced developer, but new to FPC and Lazarus, so I thought I'd use a more experienced developer's code as an aid in learning my way round FPC and Lazarus).