This is a new page, still under construction
Searching for Files
To search for files, enter part of a file name in the “Search” textbox and press [Enter] or click on “File Search”. This will find all files where the entered text is part of the file name. Searching is done using $. An empty search text will find all files.
The date/time for VCXs and SCXs is determined by the most recent timestamp from the individual rows in the file, not the timestamp of the file on disk.
Searching for Files - Advanced
You can use wildcards (‘?’ and ‘*’) in your search as well. This, too, finds all files where the entered text is part of the file name. Searching is done using LIKE().
Searching using wildcards find matches within the file name. (This is accomplished by catenating ‘*’ before and after the search text.)
To find file names beginning with text you enter, begin with ‘^’.
To find file names ending with text you enter, end with ‘$’
Searching for File Name Extensions
To restrict your search to a particular file name extension, enter a dot and the extension after the search text. For example, “JOB.PRG” would find all PRG files that contain the text “JOB”
You can use wildcards when specifying an extension. “JOB.?CX” would search all forms and class libraries.
You can search multiple file extensions by entering each of them, separated by dots. Thus, you could also search all forms and class libraries by entering “JOB.SCX.VCX”
Multiple searches
To specify multiple search terms, separate them by ‘|’. This will find all files matching any of the search terms. “JOB|PART” finds all find containing the text “JOB” or “PART”
Searching for Classes
To search for classes, use the same rules as explained above for files, except that you click on “Class Search”. In the options form you can make this the default used when you press [Enter].
Searching for classes is done in both VCXs and PRGs. For PRGs, it is not possible to determine the base class.
The date/time for classes in VCXs is determined by the most recent timestamp from the individual rows in the file, not the timestamp of the file on disk.
Scope
The scope for your search may be either a project (which need not be open) or a folder (including sub-directories). The drop-down list shows a MRU list of projects and folders. In the options form you can also create a “Favorites” list of projects and/or folders to appear in this drop-down list.
Operations on Files or Classes
The original concept of this tool was to provide a simple mechanism for finding and opening files. Double-clicking any row in the grid will open the selected file or class. The underlying mechanism here is the FoxPro function EditSource(). There are a few other things that occur when the file is opened:
- The file is opened using the same case as the file name on disk, so the case of the file name will not be changed.
- The file is added to the appropriate FoxPro MRU list. Other Thor tools allow you to access these lists without visiting the command window.
- If you use Source Control, you can use the Options form to indicate that you want to be asked to check out files from Source Control before opening them.
You can also right-click on any row in the grid for a context menu. This items in this menu are sensitive to the extension of the file or class selected, and may include any of these options:
- Open (same as Dbl-Click)
- Run (for PRGs, SCXs, and FRXs)
- Open with HackCX (this option is always available but only works if HackCX is installed)
- Create VCA/SCA/etc. file using SCCTEXTX
- Pack
- Modify Structure
- Reindex
- Add to or Remove from current project
- Open folder in Explorer
- CD to this folder
- Set scope to this folder
Sorting the Grid
You can sort the grid by clicking on a column header.
Additional Filters on the Grid
You can filter the rows in the grid by right-clicking in a column header (other than the timestamp or size columns).
Searching is done using $ and you can use wildcards (* and ?) if desired.
If such a filter is in effect, right-clicking in a column header again can be used either to further filter the grid or to create a new filter.
One possible use of this would be when the search on a project of folder was too slow to repeat frequently. Instead, you could search the entire project or folder once, and then just repeatedly use this filtering mechanism to isolate the file or class you are interested in
Drag/Drop classes
When you have searched for classes, you can drag the class from the current highlighted row in the grid and drop it on a form or class you are editing. You can begin dragging it by either:
- Dragging the icon that appears just above the upper left hand corner of the grid.
- Or holding down the Shift or Ctrl key and dragging the row from the grid.
You can then drop the class onto a form or class you are editing, just like you do from the Class Browser. If the object under the mouse is a container, the class is added as a child object in the container, else it is added as a sibling.
As an alternative, you can also drop the class on PEM Editor. In this case, the object is added as a child or sibling of the object that is current displayed in PEM Editor. This makes it very easy to drop classes into hard to get at places, such as columns in a grid or containers that are obscured in the form/class being edited. Simply navigate to the container object (using PEM Editor, Property Window, etc.) and then drop the class onto PEM Editor.
Persistence of Settings
Most of the settings of the form persist from session to session, including its size and position, search text, scope, column widths and order, the results grid, and the current row in that grid
MRU Lists
As noted earlier, any file opened is automatically added to the appropriate FoxPro MRU list, as if it had been opened from the command window. These MRU lists can be accessed by right-clicking on either the “File Search” button (for files) or the “Class Search” button (for classes and class libraries).
MRU lists are not kept current when files are opened from either the Project Manager or the Class Browser (an unfortunate oversight). However, this can be corrected by using files found in folder Thor\Tools\Samples:
- Class Library ‘BaseProjectHooks.VCX’ contains a class that can be used as a ProjectHook for a project. If you are already using a ProjectHook class, you can simply use the QueryModifyFile method from this class.
- File ‘Browser.APP’ can be used to replace the file of the same name in Home(1).
Dockable vs not-dockable
By default, the form is dockable. This choice was not made because of the expectation that the form will ever be docked, but rather because of three effects of making it dockable.
When opened, it goes on top of all other forms, including other dockable forms.
It can be moved outside the visible FoxPro screen
The setting for Dockable can be turned off by right-clicking the titlebar of the form
You can turn off the Dockable setting, allowing the form to go behind other non-dockable windows, if desired, as long as you are careful to do so when the form is within the FoxPro screen and is not on top of a dockable window.