rwdaddresses 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/Readme.txt +57 -0
  2. data/bin/rwdaddresses +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/gl3addresses/gl3viewnamedata.rb +26 -0
  10. data/code/gl3addresses/gl4listnamerecord.rb +11 -0
  11. data/code/gl3addresses/gl4viewphoto.rb +4 -0
  12. data/code/gl3addresses/gl5createnewnamerecord.rb +17 -0
  13. data/code/lm1installapplets/ll5listzips.rb +14 -0
  14. data/code/lm1installapplets/lm1installapplet.rb +20 -0
  15. data/code/ssdiagnostictab/diagnostictab.rb +20 -0
  16. data/code/xa5rwdtinkercallable/callable.rb +13 -0
  17. data/code/xb1rwdtinkerbackwindow/05listinstalledfiles.rb +11 -0
  18. data/code/xb1rwdtinkerbackwindow/diagnostictab.rb +20 -0
  19. data/code/xb1rwdtinkerbackwindow/ll1openname.rb +18 -0
  20. data/code/xb1rwdtinkerbackwindow/ll5listzips.rb +14 -0
  21. data/code/xb1rwdtinkerbackwindow/lm1installapplet.rb +20 -0
  22. data/code/xb1rwdtinkerbackwindow/mm1removeapplet.rb +28 -0
  23. data/code/xb1rwdtinkerbackwindow/rwdtinkerwin2version.rb +14 -0
  24. data/code/zz0applicationend/zz0end.rb +4 -0
  25. data/configuration/aa0rwdframework.cnf +11 -0
  26. data/configuration/ab1tinkerwin2.cnf +3 -0
  27. data/configuration/gl3addresses.cnf +2 -0
  28. data/ev/browser.rb +109 -0
  29. data/ev/ftools.rb +170 -0
  30. data/ev/net.rb +750 -0
  31. data/ev/ruby.rb +819 -0
  32. data/ev/rwd.rb +1848 -0
  33. data/ev/sgml.rb +236 -0
  34. data/ev/thread.rb +63 -0
  35. data/ev/tree.rb +343 -0
  36. data/ev/xml.rb +4 -0
  37. data/gui/en/aa2core/aa0rwdtop.rwd +3 -0
  38. data/gui/en/gl3addresses/gl3viewnamedata.rwd +16 -0
  39. data/gui/en/gl3addresses/gl4listnamerecordfiles.rwd +17 -0
  40. data/gui/en/gl3addresses/gl5createnewnamerecord.rwd +26 -0
  41. data/gui/en/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  42. data/gui/en/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  43. data/gui/en/lz1selectiontabend/endselectiontab.rwd +1 -0
  44. data/gui/en/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  45. data/gui/en/uu5rwddocuments/uu5documents.rwd +13 -0
  46. data/gui/en/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  47. data/gui/en/uu8addresses/uu8doc_rwdschedule.rwd +4 -0
  48. data/gui/en/ww0documentsend/ww0documentend.rwd +6 -0
  49. data/gui/en/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  50. data/gui/en/xa1versionwindow/1appname.rwd +17 -0
  51. data/gui/en/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  52. data/gui/en/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  53. data/gui/en/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  54. data/gui/en/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  55. data/gui/en/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  56. data/gui/en/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  57. data/gui/en/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  58. data/gui/en/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  59. data/gui/en/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  60. data/gui/en/yg5rwdhelpabout/1appname.rwd +2 -0
  61. data/gui/en/yg5rwdhelpabout/3copyright.rwd +1 -0
  62. data/gui/en/yg5rwdhelpabout/5version.rwd +9 -0
  63. data/gui/en/yg6rwdwin2helpabout/1appname.rwd +2 -0
  64. data/gui/en/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  65. data/gui/en/yg6rwdwin2helpabout/5version.rwd +9 -0
  66. data/gui/en/yl3addresseshelp/yl3helpscreen.rwd +4 -0
  67. data/gui/en/yy7addressesphotowindow/yy7addressesphoto.rwd +3 -0
  68. data/gui/en/za1applicationend/yy9rwdend.rwd +2 -0
  69. data/gui/es/aa2core/aa0rwdtop.rwd +3 -0
  70. data/gui/es/gl3addresses/gl3viewnamedata.rwd +16 -0
  71. data/gui/es/gl3addresses/gl4listnamerecordfiles.rwd +17 -0
  72. data/gui/es/gl3addresses/gl5createnewnamerecord.rwd +26 -0
  73. data/gui/es/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  74. data/gui/es/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  75. data/gui/es/lz1selectiontabend/endselectiontab.rwd +1 -0
  76. data/gui/es/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  77. data/gui/es/uu5rwddocuments/uu5documents.rwd +13 -0
  78. data/gui/es/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  79. data/gui/es/uu8addresses/uu8doc_rwdschedule.rwd +4 -0
  80. data/gui/es/ww0documentsend/ww0documentend.rwd +6 -0
  81. data/gui/es/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  82. data/gui/es/xa1versionwindow/1appname.rwd +17 -0
  83. data/gui/es/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  84. data/gui/es/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  85. data/gui/es/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  86. data/gui/es/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  87. data/gui/es/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  88. data/gui/es/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  89. data/gui/es/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  90. data/gui/es/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  91. data/gui/es/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  92. data/gui/es/yg5rwdhelpabout/1appname.rwd +2 -0
  93. data/gui/es/yg5rwdhelpabout/3copyright.rwd +1 -0
  94. data/gui/es/yg5rwdhelpabout/5version.rwd +9 -0
  95. data/gui/es/yg6rwdwin2helpabout/1appname.rwd +2 -0
  96. data/gui/es/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  97. data/gui/es/yg6rwdwin2helpabout/5version.rwd +9 -0
  98. data/gui/es/yl3addresseshelp/yl3helpscreen.rwd +4 -0
  99. data/gui/es/yy7addressesphotowindow/yy7addressesphoto.rwd +3 -0
  100. data/gui/es/za1applicationend/yy9rwdend.rwd +2 -0
  101. data/gui/nl/aa2core/aa0rwdtop.rwd +3 -0
  102. data/gui/nl/gl3addresses/gl3viewnamedata.rwd +16 -0
  103. data/gui/nl/gl3addresses/gl4listnamerecordfiles.rwd +17 -0
  104. data/gui/nl/gl3addresses/gl5createnewnamerecord.rwd +26 -0
  105. data/gui/nl/ll1selectiontabbegin/selectiontabbegin.rwd +15 -0
  106. data/gui/nl/ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +11 -0
  107. data/gui/nl/lz1selectiontabend/endselectiontab.rwd +1 -0
  108. data/gui/nl/tt0documentsbegin/tt0documentbegin.rwd +5 -0
  109. data/gui/nl/uu5rwddocuments/uu5documents.rwd +13 -0
  110. data/gui/nl/uu6rwdtinkerwin2documents/uu5documents.rwd +4 -0
  111. data/gui/nl/uu8addresses/uu8doc_rwdschedule.rwd +4 -0
  112. data/gui/nl/ww0documentsend/ww0documentend.rwd +6 -0
  113. data/gui/nl/wz6finaltabs/xx0rwdfirsttab.rwd +4 -0
  114. data/gui/nl/xa1versionwindow/1appname.rwd +17 -0
  115. data/gui/nl/xa5rwdtinkercallablewindow/1appname.rwd +15 -0
  116. data/gui/nl/xa5rwdtinkercallablewindow/9end.rwd +4 -0
  117. data/gui/nl/xb1rwdtinkerbackwindow/1appname.rwd +3 -0
  118. data/gui/nl/xb1rwdtinkerbackwindow/2tab1.rwd +9 -0
  119. data/gui/nl/xb1rwdtinkerbackwindow/3arwddiagnostics.rwd +31 -0
  120. data/gui/nl/xb1rwdtinkerbackwindow/4arwdlistapplets.rwd +42 -0
  121. data/gui/nl/xb1rwdtinkerbackwindow/4arwdlistzips.rwd +33 -0
  122. data/gui/nl/xb1rwdtinkerbackwindow/9backend.rwd +5 -0
  123. data/gui/nl/ya1helpaboutbegin/ya0helpscreenstart.rwd +1 -0
  124. data/gui/nl/yg5rwdhelpabout/1appname.rwd +2 -0
  125. data/gui/nl/yg5rwdhelpabout/3copyright.rwd +1 -0
  126. data/gui/nl/yg5rwdhelpabout/5version.rwd +9 -0
  127. data/gui/nl/yg6rwdwin2helpabout/1appname.rwd +2 -0
  128. data/gui/nl/yg6rwdwin2helpabout/3copyright.rwd +1 -0
  129. data/gui/nl/yg6rwdwin2helpabout/5version.rwd +9 -0
  130. data/gui/nl/yl3addresseshelp/yl3helpscreen.rwd +4 -0
  131. data/gui/nl/yy7addressesphotowindow/yy7addressesphoto.rwd +3 -0
  132. data/gui/nl/za1applicationend/yy9rwdend.rwd +2 -0
  133. data/init.rb +164 -0
  134. data/installed/addressessample1.inf +5 -0
  135. data/installed/rwdaddresses-0.8.inf +11 -0
  136. data/installed/rwdtinkerwin2-0.5.inf +16 -0
  137. data/lang/en/rwdcore/languagefile.rb +6 -0
  138. data/lang/es/rwdcore/languagefile.rb +4 -0
  139. data/lang/nl/rwdcore/languagefile.rb +4 -0
  140. data/lib/temp.rb +1 -0
  141. data/names/AngelinaJolie.nam +8 -0
  142. data/names/AngelinaJolie.png +0 -0
  143. data/names/StevenGibson.nam +5 -0
  144. data/names/StevenGibson.png +0 -0
  145. data/names/nophoto.png +0 -0
  146. data/rwd_files/HowTo_Addresses.html +163 -0
  147. data/rwd_files/HowTo_Addresses.txt +145 -0
  148. data/rwd_files/HowTo_Tinker.html +370 -0
  149. data/rwd_files/HowTo_Tinker.txt +244 -0
  150. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  151. data/rwd_files/Readme.txt +57 -0
  152. data/rwd_files/contacttmp.png +0 -0
  153. data/rwd_files/favicon.ico +0 -0
  154. data/rwd_files/rdoc-style.css +175 -0
  155. data/rwd_files/rwdapplications.html +54 -0
  156. data/rwd_files/rwdindex.html +6 -0
  157. data/tests/rubyslippers-0.92.gemspec +17 -0
  158. data/tests/rwdtinker-1.2.gemspec +17 -0
  159. data/tests/rwdtinkertestEN.rb +87 -0
  160. data/tests/temptest.out +18 -0
  161. data/tests/totranslate.lang +93 -0
  162. data/zips/rwdaviewphoto-0.3.zip +0 -0
  163. data/zips/rwdhelloworld-0.2.zip +0 -0
  164. data/zips/rwdrefreshacpi-0.1.zip +0 -0
  165. data/zips/rwdwtinkerwin2-0.5.zip +0 -0
  166. metadata +206 -0
data/Readme.txt ADDED
@@ -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/
data/bin/rwdaddresses ADDED
@@ -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,26 @@
1
+ def viewnamedata
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_viewnamedata]
4
+ photoname = nametext + ".png"
5
+ begin # exception trapped block
6
+ path_to = File.join( "rwd_files", "contacttmp.png" )
7
+ path_from = File.join($addressfiles_directory, photoname )
8
+ if ! File.exist?(path_from)
9
+ path_from = File.join($addressfiles_directory,"nophoto.png" )
10
+ end
11
+ print path_from
12
+ FileUtils.cp(path_from, path_to)
13
+
14
+ fileName = $addressfiles_directory + "/" + nametext + ".nam"
15
+
16
+ fd = File.open(fileName,"r")
17
+ @viewnamedatadisplay = " "
18
+ while ! fd.eof?
19
+ @viewnamedatadisplay = fd.read
20
+ end
21
+ fd.close
22
+ rescue SystemCallError, StandardError
23
+ $stderr.print "system call error: " + $!
24
+ end # exception rescue
25
+
26
+ end
@@ -0,0 +1,11 @@
1
+ # this code is to list the contact names
2
+ def listnamerecordfiles
3
+ fileList = Dir.new($addressfiles_directory).entries.sort.delete_if { |x| ! (x =~ /nam$/) }
4
+ @listnamerecordfilesresult = fileList.rwd_method("fillcontactrecordname")
5
+ end
6
+
7
+ def fillcontactrecordname(inffile)
8
+ applet = inffile.gsub(/\.nam$/, "")
9
+ @a_viewnamedata = applet
10
+ end
11
+
@@ -0,0 +1,4 @@
1
+ def viewcontactphoto
2
+ @rwd_window = "contactphoto"
3
+
4
+ end
@@ -0,0 +1,17 @@
1
+ def createnewnamerecord # this method adds a new address record
2
+ require 'fileutils'
3
+
4
+ newname = "%s" % [@a_filename] # grab the new filename to create
5
+ newdata =@a_name.to_s + "\n" + @a_address.to_s + "\n" + @a_citystatezip.to_s + "\n" + @a_phone.to_s + "\n" + @a_email.to_s + "\n" + @a_comment1.to_s + "\n" + @a_comment2.to_s + "\n" + @a_comment3.to_s + "\n"
6
+ fullnewname = newname + ".nam"
7
+ begin # exception trapped block
8
+ fileName = File.join($addressfiles_directory, fullnewname )
9
+ fd = File.open(fileName,"w")
10
+ fd.print(newdata) # save the record info to the file
11
+ fd.close
12
+ @createnewnamerecorddisplay=newdata # show the record info in the browser
13
+ rescue SystemCallError, StandardError
14
+ $stderr.print "system call error: " + $!
15
+ end # exception rescue
16
+
17
+ 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
@@ -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
@@ -0,0 +1,28 @@
1
+ def removeapplet
2
+ require 'fileutils'
3
+ nametext = "%s" % [@a_removeapplet]
4
+
5
+ begin # exception trapped block
6
+ fileName = "installed/" + nametext + ".inf"
7
+ count = 0
8
+ fd = File.open(fileName,"r")
9
+
10
+
11
+ fd.each { |oneline|
12
+ if count == 1
13
+ commandline = "rm -r " + oneline
14
+ system( commandline+' > temp.output' )
15
+ end
16
+ count = 1
17
+ }
18
+ fd.close
19
+ commandline = "rm " + fileName
20
+
21
+ system(commandline)
22
+ @removeapplettext = "applet files removed! - restart rwd to finish uninstalling"
23
+
24
+ rescue
25
+ @removeapplettext = "\n" + "error"
26
+ end # exception rescue
27
+
28
+ end
@@ -0,0 +1,14 @@
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 runrwdtinkerwin2version
8
+ @rwd_window = "applicationversion"
9
+ @versionappnamedisplay = "RwdTinkerWin2"
10
+ @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
11
+ @versionnumberdisplay = "Version " + RwdTinkerWin2Version
12
+
13
+ end
14
+
@@ -0,0 +1,4 @@
1
+
2
+
3
+ end # end of rwdtinker class
4
+
@@ -0,0 +1,11 @@
1
+ RwdTinkerVersion = "1.23"
2
+ CodeName = "rwdtinker"
3
+ CodeNameFile = CodeName + ".rb"
4
+ RWDFile = "rwdtinker.rwd"
5
+ $lang = "en"
6
+ @@codedir = "code"
7
+ @@guidir = "gui" + "/" + $lang
8
+ @@langdir = "lang"
9
+
10
+ TempLangHashFile = @@codedir + "/" + "al5languagefiles" + "/" + "templangfile.rb"
11
+ $port = 7705