I have a form which allows me to edit VFP code in a window (positioned in the same form) with the full VFP IDE as one would normally do in the VFP IDE using "MODIFY COMMAND ABC.prg" in the COMMAND WINDOW.
I am able to do this just fine with the following code, but there are problems.
One problem is that I have to do several steps to save the file back into its MEMO field. As you may see above, the code resides in a MEMO field, which I push to a file, in some directory. Ideally, I would like to click outside of the editing window on a SAVE button, which could replace my current "Ctrl+W" to save the file back in the OS directory... and then move the file from the directory back to the Memo field (with a Single click).
I am in this problem because I keep the code in a memo field. The code "MODIFY MEMO codeSnippet" does not fire up the VFP IDE. So, typing "strtr(" does not translate to "STRTRAN(" etc... in the Edit Window which is set up with the definition above
Here is the idea... with the Save button which would save the contents back to the MEMO field
Any ideas would be appreciated.
Dennis Kean
Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
I am able to do this just fine with the following code, but there are problems.
Code:
SELECT resonator
ThisForm.editing_on = RECNO("resonator")
SET SAFETY OFF
STRTOFILE(resonator.codeSnippet,"EDITING\Snippet.prg")
SET SAFETY ON
DEFINE WINDOW xCode ;
FROM 12,52 TO 61,130 ;
TITLE "EDIT CODE" ;
FONT "Courier New",10 ;
NAME CEditor ;
SYSTEM FLOAT CLOSE GROW ZOOM
MODIFY COMMAND "EDITING\reactions.prg" NOWAIT WINDOW xCode IN WINDOW FORM1
One problem is that I have to do several steps to save the file back into its MEMO field. As you may see above, the code resides in a MEMO field, which I push to a file, in some directory. Ideally, I would like to click outside of the editing window on a SAVE button, which could replace my current "Ctrl+W" to save the file back in the OS directory... and then move the file from the directory back to the Memo field (with a Single click).
I am in this problem because I keep the code in a memo field. The code "MODIFY MEMO codeSnippet" does not fire up the VFP IDE. So, typing "strtr(" does not translate to "STRTRAN(" etc... in the Edit Window which is set up with the definition above
Here is the idea... with the Save button which would save the contents back to the MEMO field
Any ideas would be appreciated.
Dennis Kean
Simplicity is the extreme degree of sophistication.
Leonardo da Vinci