rwddemo 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. data/Readme.txt +57 -0
  2. data/bin/rwddemo +19 -0
  3. data/code/ag1core/aa0begin.rb +18 -0
  4. data/code/ag1core/rwdtinkerversion.rb +15 -0
  5. data/code/al5languagefiles/alanguagehashbegin.rb +4 -0
  6. data/code/al5languagefiles/languagehash.rb +4 -0
  7. data/code/al5languagefiles/templangfile.rb +6 -0
  8. data/code/al5languagefiles/zlanguagehashend.rb +6 -0
  9. data/code/cb7rubyeval/cb7rubyeval.rb +23 -0
  10. data/code/dd0shelleval/dd0shelleval.rb +20 -0
  11. data/code/ek0shellscripts/ek0playscript.rb +22 -0
  12. data/code/ek0shellscripts/em0listscripts.rb +12 -0
  13. data/code/ek0shellscripts/em1viewscript.rb +18 -0
  14. data/code/ek0shellscripts/en0createnewscript.rb +18 -0
  15. data/code/gh9calendar/gh9calendar.rb +16 -0
  16. data/code/ii3calculator/ca2multiply.rb +5 -0
  17. data/code/ii3calculator/ca4add.rb +5 -0
  18. data/code/lm1installapplets/ll5listzips.rb +14 -0
  19. data/code/lm1installapplets/lm1installapplet.rb +20 -0
  20. data/code/ssdiagnostictab/diagnostictab.rb +20 -0
  21. data/code/xa5rwdtinkercallable/callable.rb +13 -0
  22. data/code/xb1rwdtinkerbackwindow/05listinstalledfiles.rb +11 -0
  23. data/code/xb1rwdtinkerbackwindow/diagnostictab.rb +20 -0
  24. data/code/xb1rwdtinkerbackwindow/ll1openname.rb +18 -0
  25. data/code/xb1rwdtinkerbackwindow/ll5listzips.rb +14 -0
  26. data/code/xb1rwdtinkerbackwindow/lm1installapplet.rb +20 -0
  27. data/code/xb1rwdtinkerbackwindow/mm1removeapplet.rb +28 -0
  28. data/code/xb1rwdtinkerbackwindow/rwdtinkerwin2version.rb +14 -0
  29. data/code/zz0applicationend/zz0end.rb +4 -0
  30. data/configuration/aa0rwdframework.cnf +11 -0
  31. data/configuration/ab1tinkerwin2.cnf +3 -0
  32. data/configuration/ek0playscripts.cnf +2 -0
  33. data/configuration/gh1rwdcalendar.cnf +26 -0
  34. data/ev/browser.rb +109 -0
  35. data/ev/ftools.rb +170 -0
  36. data/ev/net.rb +750 -0
  37. data/ev/ruby.rb +819 -0
  38. data/ev/rwd.rb +1848 -0
  39. data/ev/sgml.rb +236 -0
  40. data/ev/thread.rb +63 -0
  41. data/ev/tree.rb +343 -0
  42. data/ev/xml.rb +4 -0
  43. data/extras/cal.rb +166 -0
  44. data/gui/en/aa2core/aa0rwdtop.rwd +3 -0
  45. data/gui/en/cb7rubyeval/cb7rwdrubyeval.rwd +18 -0
  46. data/gui/en/dd0rwdshelleval/dd0rwdshelleval.rwd +16 -0
  47. data/gui/en/ek0shellscripts/ek0playscript.rwd +15 -0
  48. data/gui/en/ek0shellscripts/el0listscripts.rwd +25 -0
  49. data/gui/en/ek0shellscripts/en0createscripts.rwd +24 -0
  50. data/gui/en/hl9calendar/hl9calendar.rwd +18 -0
  51. data/gui/en/ii3calculator/ca0rwdcalc.rwd +17 -0
  52. data/gui/en/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  53. data/gui/en/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  54. data/gui/en/lz1selectiontabend/endselectiontab.rwd +1 -0
  55. data/gui/en/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  56. data/gui/en/ub7rubyeval/rubyeval.rwd +3 -0
  57. data/gui/en/uk5rwddemodocuments/documents.rwd +3 -0
  58. data/gui/en/uu5rwddocuments/uu5documents.rwd +13 -0
  59. data/gui/en/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  60. data/gui/en/vv1docshellxp/vvdocshellxp.rwd +4 -0
  61. data/gui/en/ww0documentsend/ww0documentend.rwd +6 -0
  62. data/gui/en/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  63. data/gui/en/xa1versionwindow/1appname.rwd +17 -0
  64. data/gui/en/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  65. data/gui/en/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  66. data/gui/en/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  67. data/gui/en/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  68. data/gui/en/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  69. data/gui/en/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  70. data/gui/en/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  71. data/gui/en/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  72. data/gui/en/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  73. data/gui/en/yg5rwdhelpabout/1appname.rwd +2 -0
  74. data/gui/en/yg5rwdhelpabout/3copyright.rwd +1 -0
  75. data/gui/en/yg5rwdhelpabout/5version.rwd +9 -0
  76. data/gui/en/yg6rwdwin2helpabout/1appname.rwd +2 -0
  77. data/gui/en/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  78. data/gui/en/yg6rwdwin2helpabout/5version.rwd +9 -0
  79. data/gui/en/za1applicationend/yy9rwdend.rwd +2 -0
  80. data/gui/es/aa2core/aa0rwdtop.rwd +3 -0
  81. data/gui/es/cb7rubyeval/cb7rwdrubyeval.rwd +18 -0
  82. data/gui/es/dd0rwdshelleval/dd0rwdshelleval.rwd +16 -0
  83. data/gui/es/ek0shellscripts/ek0playscript.rwd +15 -0
  84. data/gui/es/ek0shellscripts/el0listscripts.rwd +25 -0
  85. data/gui/es/ek0shellscripts/en0createscripts.rwd +24 -0
  86. data/gui/es/hl9calendar/hl9calendar.rwd +18 -0
  87. data/gui/es/ii3calculator/ca0rwdcalc.rwd +17 -0
  88. data/gui/es/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  89. data/gui/es/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  90. data/gui/es/lz1selectiontabend/endselectiontab.rwd +1 -0
  91. data/gui/es/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  92. data/gui/es/ub7rubyeval/rubyeval.rwd +3 -0
  93. data/gui/es/uk5playscripts/uv6docscriptrunner.rwd +3 -0
  94. data/gui/es/uu5rwddocuments/uu5documents.rwd +13 -0
  95. data/gui/es/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  96. data/gui/es/vv1docshellxp/vvdocshellxp.rwd +4 -0
  97. data/gui/es/ww0documentsend/ww0documentend.rwd +6 -0
  98. data/gui/es/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  99. data/gui/es/xa1versionwindow/1appname.rwd +17 -0
  100. data/gui/es/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  101. data/gui/es/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  102. data/gui/es/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  103. data/gui/es/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  104. data/gui/es/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  105. data/gui/es/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  106. data/gui/es/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  107. data/gui/es/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  108. data/gui/es/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  109. data/gui/es/yg5rwdhelpabout/1appname.rwd +2 -0
  110. data/gui/es/yg5rwdhelpabout/3copyright.rwd +1 -0
  111. data/gui/es/yg5rwdhelpabout/5version.rwd +9 -0
  112. data/gui/es/yg6rwdwin2helpabout/1appname.rwd +2 -0
  113. data/gui/es/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  114. data/gui/es/yg6rwdwin2helpabout/5version.rwd +9 -0
  115. data/gui/es/za1applicationend/yy9rwdend.rwd +2 -0
  116. data/gui/nl/aa2core/aa0rwdtop.rwd +3 -0
  117. data/gui/nl/cb7rubyeval/cb7rwdrubyeval.rwd +18 -0
  118. data/gui/nl/dd0rwdshelleval/dd0rwdshelleval.rwd +16 -0
  119. data/gui/nl/ek0shellscripts/ek0playscript.rwd +15 -0
  120. data/gui/nl/ek0shellscripts/el0listscripts.rwd +25 -0
  121. data/gui/nl/ek0shellscripts/en0createscripts.rwd +24 -0
  122. data/gui/nl/hl9calendar/hl9calendar.rwd +18 -0
  123. data/gui/nl/ii3calculator/ca0rwdcalc.rwd +17 -0
  124. data/gui/nl/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  125. data/gui/nl/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  126. data/gui/nl/lz1selectiontabend/endselectiontab.rwd +1 -0
  127. data/gui/nl/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  128. data/gui/nl/ub7rubyeval/rubyeval.rwd +3 -0
  129. data/gui/nl/uk5playscripts/uv6docscriptrunner.rwd +3 -0
  130. data/gui/nl/uu5rwddocuments/uu5documents.rwd +13 -0
  131. data/gui/nl/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  132. data/gui/nl/vv1docshellxp/vvdocshellxp.rwd +4 -0
  133. data/gui/nl/ww0documentsend/ww0documentend.rwd +6 -0
  134. data/gui/nl/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  135. data/gui/nl/xa1versionwindow/1appname.rwd +17 -0
  136. data/gui/nl/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  137. data/gui/nl/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  138. data/gui/nl/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  139. data/gui/nl/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  140. data/gui/nl/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  141. data/gui/nl/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  142. data/gui/nl/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  143. data/gui/nl/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  144. data/gui/nl/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  145. data/gui/nl/yg5rwdhelpabout/1appname.rwd +2 -0
  146. data/gui/nl/yg5rwdhelpabout/3copyright.rwd +1 -0
  147. data/gui/nl/yg5rwdhelpabout/5version.rwd +9 -0
  148. data/gui/nl/yg6rwdwin2helpabout/1appname.rwd +2 -0
  149. data/gui/nl/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  150. data/gui/nl/yg6rwdwin2helpabout/5version.rwd +9 -0
  151. data/gui/nl/za1applicationend/yy9rwdend.rwd +2 -0
  152. data/init.rb +164 -0
  153. data/installed/rwdrubyeval-0.3.inf +5 -0
  154. data/installed/rwdscriptrunner-0.3.inf +9 -0
  155. data/installed/rwdshellxp-0.4.inf +5 -0
  156. data/installed/rwdtinkerwin2-0.5.inf +16 -0
  157. data/lang/en/rwdcore/languagefile.rb +6 -0
  158. data/lang/es/rwdcore/languagefile.rb +4 -0
  159. data/lang/nl/rwdcore/languagefile.rb +4 -0
  160. data/lib/temp.rb +1 -0
  161. data/rwd_files/HowTo_RubyEval.html +80 -0
  162. data/rwd_files/HowTo_RwdDemo.txt +172 -0
  163. data/rwd_files/HowTo_Tinker.html +370 -0
  164. data/rwd_files/HowTo_Tinker.txt +244 -0
  165. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  166. data/rwd_files/HowTo_shellxp.html +105 -0
  167. data/rwd_files/Readme.txt +57 -0
  168. data/rwd_files/favicon.ico +0 -0
  169. data/rwd_files/rdoc-style.css +175 -0
  170. data/rwd_files/rwdapplications.html +54 -0
  171. data/rwd_files/rwdindex.html +6 -0
  172. data/scripts/date.sh +2 -0
  173. data/scripts/lister.sh +2 -0
  174. data/scripts/uname.sh +2 -0
  175. data/tests/rwdtinkertestEN.rb +87 -0
  176. data/tests/temptest.out +18 -0
  177. data/tests/totranslate.lang +93 -0
  178. data/zips/rwdaviewphoto-0.3.zip +0 -0
  179. data/zips/rwdhelloworld-0.2.zip +0 -0
  180. data/zips/rwdrefreshacpi-0.1.zip +0 -0
  181. data/zips/rwdscriptrunner-0.3.zip +0 -0
  182. data/zips/rwdwtinkerwin2-0.5.zip +0 -0
  183. metadata +224 -0
@@ -0,0 +1,57 @@
1
+ rwdapplications are web brower applications
2
+
3
+ The GUI interface used is RubyWebDialogs
4
+
5
+ RubyWebDialogs is a platform independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. http://www.erikveen.dds.nl/rubywebdialogs/
6
+
7
+
8
+ Start the program by:
9
+ changing to the directory and
10
+ ruby init.rb
11
+
12
+ Then point your web browser to:
13
+ http://localhost:7701/
14
+
15
+ Or to the port that shows on the console or in the config.cnf file
16
+
17
+ Requirements:
18
+ RubyWebDialogs - I am using 0.0.11 2004-3-9
19
+ This package you downloaded should have a runtime version of
20
+ the needed rubywebdialog files
21
+
22
+ Ruby I am using version 1.8.2
23
+
24
+ I have tested this under Linux-Debian kernel 2.6.9
25
+
26
+ Operation:
27
+ The code files reside in the code directory and are combined before
28
+ the main Class is loaded
29
+
30
+ The rwd files in gui are combined before the gui is activated
31
+
32
+ Trouble shooting:
33
+
34
+ untar the file
35
+ tar zxvf rwdapplication-x.y.tar.gz
36
+ then cd to the directory
37
+ cd rwdapplication-x.y
38
+ then start the init.rb program file
39
+ ruby init.rb
40
+
41
+
42
+ If the program is not working, try looking at the ev subdirectory. That is where
43
+ the runtime of rubywebdialogs are.
44
+
45
+ for long term installation, I would suggest putting most files in a lib directory
46
+ like /usr/lib/rwdshell
47
+ then make a writable directory the local directory for command files to be written
48
+ like ~/rwdshell
49
+
50
+
51
+ Closing the browser doesn't terminate the application. You have to use the application's close-button And terminating the application doesn't terminate the application when running in network mode. You just log out.
52
+
53
+ Don't use the back-button of the browser! Strange and unpredictable things may and will happen!
54
+
55
+ Steven Gibson
56
+ stevengibson@superant.com
57
+ http://rwdapplications.rubyforge.org/
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ #--
3
+ # Copyright 2004 Steven Gibson <steven@superant.com>
4
+ # RwdTinker application
5
+ #
6
+ # This program is free software. It may be redistributed and/or modified under
7
+ # the terms of the GPL version 2 (or later), or the
8
+ # Ruby licence.
9
+ #
10
+ #++
11
+
12
+
13
+ $progdir = File::expand_path( File.dirname(__FILE__))
14
+
15
+ Dir.chdir($progdir)
16
+
17
+ Dir.chdir("..")
18
+
19
+ `ruby init.rb`
@@ -0,0 +1,18 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+ # This class is the top class for the RwdTinker application
6
+
7
+ class RwdTinker < RWDialog
8
+
9
+ def main
10
+ @rwd_window = "main"
11
+ @result = "idle"
12
+ @display= "idle"
13
+ end
14
+
15
+ def inspect
16
+ "Rwdtinker Application "
17
+ end
18
+
@@ -0,0 +1,15 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # return the version constant defined in the config file
7
+ def runrwdtinkerversion
8
+ @rwd_window = "applicationversion"
9
+ @versionappnamedisplay = "RwdTinker"
10
+ @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
11
+ @versionnumberdisplay = "Version " + RwdTinkerVersion
12
+
13
+ end
14
+
15
+
@@ -0,0 +1,4 @@
1
+
2
+
3
+ Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Identificador de mensaje desconocido: #{kk.inspect}."; hh[kk] }
4
+ langmessage = {
@@ -0,0 +1,4 @@
1
+ # The encoding for the webpages. This should match the encoding used
2
+ # to create these messages.
3
+
4
+
@@ -0,0 +1,6 @@
1
+ # English Language files for RwdTinker core
2
+
3
+ :module_unknown => "Module unknown",
4
+ :applet_installed => "applet installed!.",
5
+
6
+
@@ -0,0 +1,6 @@
1
+
2
+ }
3
+ langmessage.each { |kk, vv| Message[kk] = vv }
4
+
5
+
6
+
@@ -0,0 +1,23 @@
1
+ $buffer = ''
2
+ def $buffer.write(str) # create a variable to use in rubyeval
3
+ self << str
4
+ end
5
+ def rubyeval
6
+ commandtextruby = "%s " % [@a_rubyeval]
7
+ $tmpout = $stdout # save the original STDOUT
8
+ $stdout = $buffer
9
+ begin # begin rescue monitored block
10
+ eval( commandtextruby )
11
+
12
+ @rubydisplay = $stdout
13
+
14
+ $stdout = $tmpout # restore STDOUT to normal
15
+
16
+ rescue # process exeption
17
+ $stdout = $tmpout # restore STDOUT to normal
18
+ @rubydisplay = "\n" + "error in eval"
19
+ end # end of rescue process # of rescure monitored block
20
+
21
+
22
+ end
23
+
@@ -0,0 +1,20 @@
1
+
2
+
3
+ def shelleval
4
+
5
+ commandtext = "%s " % [@a_shelleval]
6
+
7
+ begin # exception trapped block
8
+ system(commandtext+' > temp.output')
9
+
10
+
11
+ @result =`#{commandtext}`
12
+
13
+ rescue SystemCallError, StandardError
14
+ $stderr.print "system call error: " + $!
15
+ end # exception rescue
16
+
17
+ end
18
+
19
+
20
+
@@ -0,0 +1,22 @@
1
+ def playscript
2
+
3
+
4
+ nametext = "%s" % [@a_scriptcmd]
5
+
6
+ begin # exception trapped block
7
+ fileName = "scripts/" + nametext + ".sh"
8
+
9
+ fd = File.open(fileName,"r")
10
+
11
+
12
+ commandtext = fd.read
13
+ fd.close
14
+
15
+
16
+ @playscript_display = `#{commandtext}`
17
+
18
+
19
+ rescue SystemCallError, StandardError
20
+ $stderr.print "system call error: " + $!
21
+ end # exception rescue
22
+ end
@@ -0,0 +1,12 @@
1
+ # this code is to list the scripts
2
+ def listscripts
3
+ fileList = Dir.new($shellscript_directory).entries.sort.reverse.delete_if { |x| ! (x =~ /sh$/) }
4
+ @listscriptresult = fileList.rwd_method("fillscriptname")
5
+ end
6
+
7
+ def fillscriptname(inffile)
8
+ applet = inffile.gsub(/\.sh$/, "")
9
+ @a_scriptlist = applet
10
+ @a_scriptcmd = applet
11
+ end
12
+
@@ -0,0 +1,18 @@
1
+ def viewscript
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_scriptlist]
4
+
5
+ begin # exception trapped block
6
+ fileName = "scripts/" + nametext + ".sh"
7
+
8
+ fd = File.open(fileName,"r")
9
+ @displayscripttext = " "
10
+ while ! fd.eof?
11
+ @displayscripttext = fd.read
12
+ end
13
+ fd.close
14
+ rescue
15
+ @displayscripttext = "\n" + "error"
16
+ end # exception rescue
17
+
18
+ end
@@ -0,0 +1,18 @@
1
+
2
+ def createnew # this method adds a new script file
3
+ require 'fileutils'
4
+
5
+ newname = "%s" % [@a_filename] # grab the new filename to create
6
+ newdata =@a_firstline.to_s + "\n #" + @a_commentline.to_s + "\n"
7
+ fullnewname = newname + ".sh"
8
+ begin # exception trapped block
9
+ fileName = File.join( $shellscript_directory, fullnewname )
10
+ fd = File.open(fileName,"w")
11
+ fd.print(newdata) # save the record info to the file
12
+ fd.close
13
+ @newdisplay=newdata # show the record info in the browser
14
+ rescue
15
+ @newdisplay = "\n" + "system error in createnew method"
16
+ end # exception rescue
17
+
18
+ end # end of createnew
@@ -0,0 +1,16 @@
1
+ require 'fileutils'
2
+
3
+ def showmonth
4
+
5
+ begin # begin rescue monitored block
6
+
7
+ command_file_path = File.join( $extras_directory, 'cal.rb' )
8
+
9
+ @showmonthresult = `ruby #{command_file_path} -c #{$lang} #{@a_month.to_i} #{@a_year.to_i} `
10
+
11
+ rescue # process exeption
12
+ @showmonthresult = "\n" + "error in eval"
13
+ end # end of rescue process # of rescure monitored block
14
+
15
+ end
16
+
@@ -0,0 +1,5 @@
1
+
2
+ def multiply
3
+ @result = "%s * %s = %s" % [@a_calc, @b_calc, @a_calc.to_i*@b_calc.to_i]
4
+ end
5
+
@@ -0,0 +1,5 @@
1
+ def add
2
+ @result ="%s + %s = %s" % [@a_calc, @b_calc, @a_calc.to_i+@b_calc.to_i]
3
+ end
4
+
5
+
@@ -0,0 +1,14 @@
1
+ # this code is to list the zipped applets that can be installed
2
+ def listzipfilestoinstall
3
+ fileList = Dir.new("zips").entries.sort.reverse.delete_if { |x| ! (x =~ /zip$/) }
4
+ @zipslistresult = fileList.rwd_method("fillziptoinstallname")
5
+ end
6
+
7
+ def fillziptoinstallname(inffile)
8
+ applet = inffile.gsub(/\.zip$/, "")
9
+ @a_installapplet = applet
10
+
11
+ end
12
+
13
+
14
+
@@ -0,0 +1,20 @@
1
+ def installapplet
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_installapplet]
4
+
5
+ begin # exception trapped block
6
+ fileName = "zips/" + nametext + ".zip"
7
+
8
+ commandline = "unzip -o " + fileName
9
+ system( commandline+' > temp.output' )
10
+
11
+
12
+
13
+ system(commandline)
14
+ @installapplettext = Message[:applet_installed]
15
+
16
+ rescue
17
+ @installapplettext = "Done! - Check applet list - restart rwd to activate the new applet"
18
+ end # exception rescue
19
+
20
+ end
@@ -0,0 +1,20 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # return the Ruby constant
7
+ def runrubyversion
8
+ @rubyversion = "Version " + VERSION
9
+ end
10
+
11
+ # return the platform constan
12
+ def runviewplatform
13
+ @platformdisplay = "Platform is " + RUBY_PLATFORM
14
+ end
15
+
16
+ # return Rwdtinker version to diagnostic tab
17
+ def rwdtinkerversiondiagnostic
18
+ @rwdtinkerversionreturn = "rwdtinker version " + RwdTinkerVersion
19
+ end
20
+
@@ -0,0 +1,13 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # call the rwdtinker helpwindow
7
+ def runrwdtinkerhelpwindow
8
+ @rwd_window = "rwdtinkerhelpwindow"
9
+ end
10
+ def runrwdtinkerbackwindow
11
+ @rwd_window = "tinkerbackwindow"
12
+ end
13
+
@@ -0,0 +1,11 @@
1
+ # this code is to list the applets that are installed
2
+ def listinstalledfiles
3
+ fileList = Dir.new("installed").entries.sort.reverse.delete_if { |x| ! (x =~ /inf$/) }
4
+ @filesresult = fileList.rwd_method("fillappletname")
5
+ end
6
+
7
+ def fillappletname(inffile)
8
+ applet = inffile.gsub(/\.inf$/, "")
9
+ @a_installlist = applet
10
+ @a_removeapplet = applet
11
+ end
@@ -0,0 +1,20 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
+
6
+ # return the Ruby constant
7
+ def runrubyversion
8
+ @rubyversion = "Version " + VERSION
9
+ end
10
+
11
+ # return the platform constan
12
+ def runviewplatform
13
+ @platformdisplay = "Platform is " + RUBY_PLATFORM
14
+ end
15
+
16
+ # return Rwdtinker version to diagnostic tab
17
+ def rwdtinkerversiondiagnostic
18
+ @rwdtinkerversionreturn = "rwdtinker version " + RwdTinkerVersion
19
+ end
20
+
@@ -0,0 +1,18 @@
1
+ def openname
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_installlist]
4
+
5
+ begin # exception trapped block
6
+ fileName = "installed/" + nametext + ".inf"
7
+
8
+ fd = File.open(fileName,"r")
9
+ @displaytext = " "
10
+ while ! fd.eof?
11
+ @displaytext = fd.read
12
+ end
13
+ fd.close
14
+ rescue
15
+ @displaytext = "\n" + "error"
16
+ end # exception rescue
17
+
18
+ end
@@ -0,0 +1,14 @@
1
+ # this code is to list the zipped applets that can be installed
2
+ def listzipfilestoinstall
3
+ fileList = Dir.new("zips").entries.sort.reverse.delete_if { |x| ! (x =~ /zip$/) }
4
+ @zipslistresult = fileList.rwd_method("fillziptoinstallname")
5
+ end
6
+
7
+ def fillziptoinstallname(inffile)
8
+ applet = inffile.gsub(/\.zip$/, "")
9
+ @a_installapplet = applet
10
+
11
+ end
12
+
13
+
14
+
@@ -0,0 +1,20 @@
1
+ def installapplet
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_installapplet]
4
+
5
+ begin # exception trapped block
6
+ fileName = "zips/" + nametext + ".zip"
7
+
8
+ commandline = "unzip -o " + fileName
9
+ system( commandline+' > temp.output' )
10
+
11
+
12
+
13
+ system(commandline)
14
+ @installapplettext = Message[:applet_installed]
15
+
16
+ rescue
17
+ @installapplettext = "Done! - Check applet list - restart rwd to activate the new applet"
18
+ end # exception rescue
19
+
20
+ end