Update Ring Notepad - Better Code - GetMainFile() function.
@@ -2238,32 +2238,28 @@ Class RNoteController from WindowsControllerParent
func pSetMainFile
oTxtMainFile.setText(cActiveFileName)
- func pDebugMainFile
+ func GetMainFile
cMainFileName = trim(oTxtMainFile.text())
if cMainFileName = NULL
pSetMainFile()
cMainFileName = trim(oTxtMainFile.text())
ok
+ return cMainFileName
+
+ func pDebugMainFile
+ cMainFileName = GetMainFile()
if cMainFileName = Null return pNofileopened() ok
if not fexists(cMainFileName) return ok
pDebugOperation(cMainFileName)
func pRunMainFile
- cMainFileName = trim(oTxtMainFile.text())
- if cMainFileName = NULL
- pSetMainFile()
- cMainFileName = trim(oTxtMainFile.text())
- ok
+ cMainFileName = GetMainFile()
if cMainFileName = Null return pNofileopened() ok
if not fexists(cMainFileName) return ok
pRunOperation(cMainFileName)
func pRunGUIMainFile
- cMainFileName = trim(oTxtMainFile.text())
- if cMainFileName = NULL
- pSetMainFile()
- cMainFileName = trim(oTxtMainFile.text())
- ok
+ cMainFileName = GetMainFile()
if cMainFileName = Null return pNofileopened() ok
if not fexists(cMainFileName) return ok
oDockOutputWindow { show() raise() }
