Update Form Designer - Support (.) and (-) operators in the file name.
@@ -15,9 +15,9 @@ class FormDesignerCodeGenerator
cSourceFileName = substr(cFormFileName,".rform","View.ring")
cFormName = GetFileNameOnlyWithoutPath(substr(cFormFileName,".rform",""))
cClassName = cFormName + "View"
- cClassName = substr(cClassName," ","_")
+ cClassName = PrepareClassName(cClassName)
cClassName2 = cFormName + "Controller"
- cClassName2 = substr(cClassName2," ","_")
+ cClassName2 = PrepareClassName(cClassName2)
# Add the File Header
cOutput = "# Form/Window View - Generated Source Code File " + nl +
"# Generated by the Ring "+version()+" Form Designer" + nl +
@@ -71,6 +71,12 @@ class #{f2} from windowsControllerParent
cOutput = substr(cOutput,"#{f3}",cClassName)
write(cSourceFileName,cOutput)
+ func PrepareClassName cClassName
+ cClassName = substr(cClassName," ","_")
+ cClassName = substr(cClassName,"-","_")
+ cClassName = substr(cClassName,".","_")
+ return cClassName
+
func GetFileNameOnlyWithoutPath cFileName
cFN = cFileName
nCount = 0
