Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Third Party tools for editing FPW code 2

Status
Not open for further replies.

Don Child

Programmer
Apr 4, 2003
62
2
8
US
Hi,

Do you know of any third party tools I can purchase, that make editing easier?

I don't mean for .prg files ; I have both UltraEdit and the legacy MultiEdit.

I mean for forms or other components. I just find the Foxpro editors cumbersome.

It could be a standalone tool, or an add-in.


Thanks and regards,

 
Hi,
Not clear what you are looking for.
The title of this message is requesting a tool for editing FPW code. I suppose you are working with VFP for Dos. Anyway FPW code is not to be editted.
What do you find cumbersome to edit forms?
Stau healthy,
Koen
 
Hi,

I'm referring to VFP 9. Spelt the acronym wrong.

When editing the code for a form, it doesn't have the same look & feel as a text editor.

Also - and this is a separate issue that I might open a thread about - I can't open the entire code for a form at the same time. I tried looking in the class browser, selecting Form. But it shows absolutely nothing, there's no form to select ; the list is empty. I'm sure that I'm doing something wrong, but if there was an Editor add-in that opened up the code for the given component, the point would be moot.

But the main obstacles to convenience, is that the native code editor in VFP isn't as convenient for searching & replacing & navigating as a standard text editor.

So - does anyone know of an add-in or a standalone text editor that will open Foxpro's Class files or Forms directly?
 
Do you mean a tool that will enable you to search for text across a whole project, like you might in C# or VB?

So you search for "Replace myField with..." and it presents all the files that contain that?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I have never heard of a replacement editor for forms or classes - as opposed to PRGs (or other purely text files).

However, perhaps I can address your concerns about the built-in editor.

Searching and replacing

By default, the built-in Find tool (what you get when you hit CTRL+F in the editor) just searches in the current method. But at the bottom of the dialogue, you can select "All objects" to search the entire form or class. This also works with Replace.

Seeing all the code at once

You are right to use the Class Browser. But what you need to do is to click the "View Additional File" button. This will let you open a form or a class. Then click the "View Class Code" button. That will open an window with the code for the entire form or class.

Other points

Keep in mind that the native editor has many benefits, including things like quickly finding where a function or procedure is defined, adding bookmarks, integration with the debugger, a Beautify tool, and - above all - Intellisense. You are unlikely to find any of these in a replacement editor.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Gotta love Beautify!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
But at the bottom of the dialogue, you can select "All objects" to search the entire form or class. This also works with Replace."

Mike,

I'm able to do this, of course. But it's still not as satisfying as a text editor. The Flow isn't the same. Personal taste.

"But what you need to do is to click the "View Additional File" button. This will let you open a form or a class. Then click the "View Class Code" button. That will open an window with the code for the entire form or class."

Perfect. That works, thanks.

In a pinch - and I'm not sure about this, so I'll back up the entire project first - I can copy and paste a section or the entire form code into the text editor, make changes, then paste it back.

And yes, I know there's some risk, it might screw up the entire form. But I have to try, because the native editor is driving me nuts.


"Keep in mind that the native editor has many benefits, including things like quickly finding where a function or procedure is defined, adding bookmarks, integration with the debugger, a Beautify tool, and - above all - Intellisense."

Yep. I don't need to use the text editor all the time. Only when the size of the code makes it easier for me to use a familiar tool.

Also, I'm outside the house today, and so I'm using a laptop keyboard and mouse pad. Even inside the FP environment or with an external text editor, it's easier with an external keyboard and mouse, which isn't available. So it's doubly frustrating today.

Thanks Mike, Koen, and GriffMG.

 
I wrote several tools for editing VFP forms, classes, menus, and program (prg) files. These all are APP files that run inside the VFP design-time environment. To integrate them I also wrote a replacement for the PJX file and associated project manager. In the past I have offered them for free (I started coding them around 2006 and been using since). They use several active-x components.

Below is a screen shot of the SCX editor (the VCX editor is similar and can edit all classes in a single VCX file).

2021-04-12_16-03-54_iswqfu.png


Below is a screen shot of editing properties in side the editor (support for single object property edit mode or multiple object property edit mode):

2021-04-12_16-08-32_udzvl7.png


Below is a screen shot of the menu editor which has more functionality than the standard menu editor:

2021-04-12_16-11-31_pl6nwm.png


The editors all use the active-x CodeMax editor component which has many more features than the VFP editor. I believe most (if not all) the features added by Thor tool is also available but much more. Intellisense (expanded beyond VFP), bookmarks with tooltip/jump to in the side bar (similar to how Eclipse works), Line numbering, code block highlighting, undeclared variable highlighting, selected text highlighting, jump to compile errors, advanced and incremental search, code peek, where-used search, list of search results with hyperlink to code line, are to name some of the features. The editors for SCX and VCX does not allow you to add controls or delete them (this was being worked on but since I do the layout using standard VFP I decided to abandon the work which can display the form/class but not save changes).

The source is there for anyone to add or change functionality to suite needs. I can create a new GIT repository if you are interested in seeing for yourself.

Greg
 
Thor has some tools that make it easier to see more code at once, though not necessarily to edit it. To see all the code in a form or all the code for a control on a form, including all inherited code, choose Thor Tools | Reports | Code Listings and then choose whichever options make sense for your situation. Really handy when you're trying to figure out where some code came from.

Also handy for working in forms and classes is the Edit Parent and Containing Classes option found under Thor | Parent Classes.

And, of course, GoFish is the best way to search the whole project.

There's more, but that should get your started.

Tamar
 
Thanks Green and Tamar, looks pretty good.

For now, I have to open another thread. Having lots of problems making the default PATHs persistent.


T & R,

 
Greg, your CodeMax-based editor looks interesting. Thanks for offering to make it available to Tek Tips members.

I am not familiar with CodeMax, but I see from the docs that it natively supports C++, Java, SQL, Basic and Pascal, but with no mention of FoxPro. Did you add FoxPro support yourself as a custom language?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hello,

in tools menu there is "document view" (not sure on english name, its above codereferences).
If you open it and click on a form you see a "procedurelist" even if its in control's methods.
A click opens it.

And just to mention it :
There are tools which convert vcx,scx,... to prg and viceversa , search "bin2prg"


Regards
tom
 
Just a note about the view code from class browser. this code has some deficits - the major one if you edit the prg code you don't edit the form.

The tool to create a prg from a form or class library is just designed to be able to use a source code control system which best work on text files, but the original code of VFP has not exported code with the same order of elements, which leads to bad diffs.

I would recommend to get used to the visual designers, it pays more than it costs to struggle with some inconveniences, it helkps to have the propertes window open to navigate through the code. I personally also sometimes would like to have the overall overview, but it's also a sign of repeating too much code, when you want that. so the visual designers guide you into centralizing some code, and then be able to focus on the one event/method of interest.

The visual designers also integrate the view of inherited code, which the view code doesn't have.

Chriss
 
The CodeMax editor is an active-x component for editing text files and alone it provides for edit of text, a number of built in commands, and macro recording. It has a very strong engine for defining programming language syntaxes which I added VFP in order to add highlighting and make it aware of all the native VFP commands, functions, properties, and methods; it also will highlight the DEFINE values when the <define>.h file is specified in a VCX or SCX. With this also includes support for intellisense. I fixed the VFP issue of not having intellisense inside a WITH-ENDWITH construct and added support for table fields when the tables are defined in the form's dataenvironment or the project file. However, I did not add the intellisense to variables when they are declared; LOCAL lcMyVar AS <something>. I do not use this syntax when defining variables so I never added support.

I added many more features to the CodeMax editor such as:
[ul][li] Code insert (SQL commands, REPLACE WITH command with fields, field lists, list of controls, and RGB() color value) [/li]
[li] Code refactoring, [/li]
[li] Bookmarks shown in the left sidebar (with fast selection from the right sidebar similar to Eclipse), [/li]
[li] Code tips, [/li]
[li] Code completion, [/li]
[li] Help for commands/syntax, [/li]
[li] Code comparison (current method code to last saved method code), [/li]
[li] Copy buffers for code snippets (with full edit capability of the snippet list), [/li]
[li] Goto definition (opens PRG based functions in a separate editor session),[/li]
[li] Where-used references (provides a list with hyperlink jump to the code), [/li]
[li] Quick search (text entry into a text box that provides for incremental search in the current edit buffer without having to open an input form that can jump to repeated values)[/li]
[li] Code peek [/li]
[li] Line numbers [/li]
[li] Hot keys for commands [/li]
[li] Highlight mode for undeclared variables [/li]
[li] Highlight mode for current selection [/li]
[li] Beautify code [/li]
[li] Win32 DECLARE-DLL insert from list [/li]
[li] Color value selection from color-wheel (RGB() value insert) [/li]
[li] Color display of a value in a RGB() command [/li]
[li] Memberdata edit and extension of memberdata beyond the VFP limit [/li]
[li] Macro recording and execution [/li]
[li] Add properties or methods from another form or visual class [/li]
[li] Enhanced printing of the methods or properties [/li]
[li] Enhanced property editor [/li]
[li] Current selected line highlight [/li]
[li] Auto-indention when inserting code [/li]
[li] Change bar for line changes in the left sidebar [/li]
[li] Jump to matching code blocks (i.e., jumps from IF to associated ENDIF and other code blocks such as CASE-ENDCASE or matching parenthesis) [/li]
[li] Transpose code at the equal '=' sign (moves what is on the right side of the equal sign to the left side and the left side to the right side) [/li]
[li] If there is a missing code block command (i.e., missing the closing ENDIF), then the editor will show the below code blocks without highlight [/li]
[li] Compile errors are shown in a list with hyperlink to the code line with the error [/li]
[li] Show white space toggle [/li]
[li] Quick back navigation to last cursor position (allows forward or backward navigation) [/li]
[li] Goto line number [/li]
[li] Display of current cursor position in the status bar [/li]
[li] Display of current selected text length in the status bar [/li]
[li] Display of the current object that is being edited in the method code [/li]
[li] Tooltip text of the full path of the method in the Tab (shows the full object hierarchy) [/li]
[/ul]

I think the above list covers most of the features that I added. There is also a personalization form for choosing your own color highlights and other features.
 
For what it's worth, the environment manager can set up more than just paths.

And when you hover the link for an environment you can see what it actually executes:
Code:
Do HOME() + "envmgr.app" WITH "_...."
Where "_...." is a random (SYS(2015)) key of one environment.

Put that into config.fpw:
Code:
COMMAND=Do HOME() + "envmgr.app" WITH "_...."

Save config.fpw to c:\root (in your case) or the project home folder.

Then also within c:\root create a link to VFP9.exe, in the shortcut properties change "execute in" to nothing, which on one side means VFP starts within the project directory (set default), and on the other side means it takes into account the config.fpw there. And that opens up a few more options, see the help topic about config.fpw

If you only ever work in one project you can also use a config.fpw in HOME() itself, which is taken into account when starting VFP9 from anywhere but with individual VFP9 start shortcuts you can use multiple config.fpw and customize them as you want per project folder.

Chriss
 
The editors were a development that began around 2005 timeframe before the announcement of the ending of VFP by Microsoft. Initially I wanted something as simple as line numbering when editing the code and the ability to move the editor to a second monitor (outside of the confines of the VFP development window). I came across the CodeMax editor and began the effort. Features were added over the years since I wanted more capability and VFP wasn't going to give it (no more development there). I haven't done much with the code base for a number of years now as it is working for me.

Years ago I have shown the editors to the community (at some VFP clubs and in various threads such as this) but have had no long term takers that I know of. My guess is that they are concerned that it might corrupt their code which I can understand. I do hack the SCX / VCX files to parse the methods and the properties and then have to update them during the save. But I have actually had VFP itself corrupt more of my forms/classes than my code editor (haven't had any corrupted). The source code is available to anyone interested so that they can see how it is being hacked/saved.

I created a number of editors which all run as Top-level forms (this allows the moving of the editor to a second monitor): VCX editor, SCX editor, PRG/H editor, MNU editor, DBF editor, table browser, comparison editors (forms, visual classes, programs and table schema), global search tool, and a replacement for the project manager. The replacement project manager still actually uses the PRJ files (as well as my own file format) as these are required to be able to build APP or EXE programs. My project manager allows for selecting the project object and opening the appropriate replacement editor or the native VFP editor. Also, I added basic version capability and project search capability and a few other smaller features. The MNU editor also has more features that the native VFP editor - ability to copy nodes and move nodes (including the child nodes). The MNU editor can also compile the menu to code that supports the standard VFP menu or to code that is based on Win32 Owner drawn API (this is what I use). The DBF editor also adds features -- runs modeless, shows a preview of changes to the schema, renaming the DBF file (even if contained in a DBC), renaming the associated DBC file, and will generate code for creating the DBF. Most of the code is not a hack in the DBF editor (uses standard commands to apply the changes); only the rename of the DBC is a hack as this requires low-level access to the DBF(s) to update the backlink.

I am willing to place the source into a GIT repository that others can access if anyone is interested.
 
Hi Greg, It's been a while that I have'nt work with Visual foxpro and I noticed that I have been missing it. So trying to get the best environment development, I came accross your package wich impressed me but unfortunetly, I could not make it work. I could find a copy of the Codemax activex. I am also missimg other ocx namely bblist~1.ocx (I do not have the complete name) I think it has something to do with a grid. While opening the GKK*.APP, many of them are complaining that the system.app is missing. I could not find it anywhere.
GKKProjectManager.app and GKKSearchGlobal.app are complaining that destroyicon.prg is missing. I search inside all files and I could not find it either. Finally GKKCompare.app do not find API Library probably because foxpro is unable to open the GKKCodeLibrary.app because of the missing bblist~1.ocx .
Theres no literature as to How to install the whole thing and make it work automatically. Could you please give some advise how I should set this all up.

Thanks in advance for your advice

Claude
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top