code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb in rwdschedule-0.98 vs code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb in rwdschedule-0.99
- old
+ new
@@ -1,18 +1,19 @@
- # this method saves the configuration record
- def saveconfigurationrecord
- require 'fileutils'
- if @a_configurationfilename
- newname = "%s" % [@a_configurationfilename] # grab the filename to create
- newdata =@a_configline1.to_s + "\n" + @a_configline2.to_s + "\n" + @a_configline3.to_s + "\n" + @a_configline4.to_s + "\n" + @a_configline5.to_s + "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.to_s + "\n"
-
- begin # exception trapped block
- fileName = File.join( ConfigurationDir, newname )
- fd = File.open(fileName,"w")
- fd.print(newdata) # save the record info to the file
- fd.close
- @newconfigurationresult=newdata # show the record info in the browser
- rescue SystemCallError, StandardError
- $stderr.print "system call error: " + $!
- end # exception rescue
- end
- end
+# this method saves the configuration record
+def saveconfigurationrecord
+ require 'fileutils'
+ if @a_configurationfilename
+ newname = "%s" % [@a_configurationfilename] # grab the filename to create
+ newdata =@a_configline1.to_s + "\n" + @a_configline2.to_s + "\n" + @a_configline3.to_s + "\n" + @a_configline4.to_s + "\n" + @a_configline5.to_s + "\n" + @a_configline6.to_s + "\n" + @a_configline7.to_s + "\n" + @a_configline8.to_s + "\n"
+
+ begin # exception trapped block
+ fileName = File.join( ConfigurationDir, newname )
+ fd = File.open(fileName,"w")
+ fd.print(newdata) # save the record info to the file
+ fd.close
+ @newconfigurationresult=newdata # show the record info in the browser
+ rescue SystemCallError, StandardError
+ $stderr.print "system call error: " + $!
+ end # exception rescue
+ end
+end
+