rwddemo 0.7 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/Readme.txt +277 -16
  2. data/code/dd0viewphoto/dd0viewphoto.rb +4 -0
  3. data/code/rwdcalc/ca2multiply.rb +6 -1
  4. data/code/rwdcalc/fadd.rb +10 -0
  5. data/code/rwdcalc/frwdcleartape.rb +9 -0
  6. data/code/rwdcalc/frwddivide.rb +10 -0
  7. data/code/rwdcalc/frwdmultiply.rb +10 -0
  8. data/code/rwdcalc/frwdsubtract.rb +10 -0
  9. data/code/rwdcalc/runrwdcalcwindow.rb +9 -0
  10. data/code/rwdcalc/rwdadd.rb +10 -0
  11. data/code/rwdcalc/rwdcleartape.rb +9 -0
  12. data/code/rwdcalc/rwddivision.rb +10 -0
  13. data/code/rwdcalc/rwdsubtraction.rb +10 -0
  14. data/code/{gh9calendar → superant.com.rwdcalendar}/gh9calendar.rb +0 -0
  15. data/code/xb1rwdtinkerbackwindow/{lm1installapplet.rb → installapplet.rb} +3 -2
  16. data/code/xb1rwdtinkerbackwindow/{05listinstalledfiles.rb → listinstalledfiles.rb} +0 -0
  17. data/code/xb1rwdtinkerbackwindow/{ll5listzips.rb → listzips.rb} +5 -3
  18. data/code/xb1rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -0
  19. data/code/xb1rwdtinkerbackwindow/loadconfigurationvariables.rb +13 -0
  20. data/code/xb1rwdtinkerbackwindow/{ll1openname.rb → openappletname.rb} +1 -1
  21. data/code/xb1rwdtinkerbackwindow/{mm1removeapplet.rb → removeapplet.rb} +0 -0
  22. data/code/xb1rwdtinkerbackwindow/saveconfigurationrecord.rb +18 -0
  23. data/configuration/language.cnf +5 -0
  24. data/configuration/rwdcalc.cnf +3 -0
  25. data/configuration/rwdcalcversion.cnf +2 -0
  26. data/configuration/{gh1rwdcalendar.cnf → rwdcalendar.cnf} +0 -0
  27. data/configuration/rwddemoversion.cnf +2 -0
  28. data/configuration/rwdplayscripts.cnf +4 -0
  29. data/configuration/rwdplayscriptsversion.cnf +2 -0
  30. data/configuration/rwdtinker.cnf +12 -0
  31. data/configuration/rwdtinkerversion.cnf +2 -0
  32. data/configuration/tinkerwin2variables.cnf +8 -0
  33. data/configuration/tinkerwin2version.cnf +3 -0
  34. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  35. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/1listplayscripts.rwd +0 -0
  36. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/2listscripts.rwd +0 -0
  37. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/3editscripts.rwd +0 -0
  38. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/4scriptutilities.rwd +0 -0
  39. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/6rwdshelleval.rwd +0 -0
  40. data/gui/{ek0shellscripts → frontwindow0/superant.com.shellscripts}/cb7rwdrubyeval.rwd +0 -0
  41. data/gui/{hl9calendar → frontwindow0/superant.com.tinkercalendar}/hl9calendar.rwd +0 -0
  42. data/gui/{ll1selectiontabbegin → frontwindowselectionbegin/selectiontabbegin}/selectiontabbegin.rwd +2 -2
  43. data/gui/{ll5rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd → frontwindowselections/superant.com.rwdcalcselectiontab/rwdcalc.rwd} +1 -1
  44. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +12 -0
  45. data/gui/{lz1selectiontabend/endselectiontab.rwd → frontwindowselectionzend/viewselectionzend/viewselectionend.rwd} +0 -0
  46. data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +6 -0
  47. data/gui/{uu5rwddocuments → frontwindowtdocuments/superant.com.documents}/uu5documents.rwd +0 -0
  48. data/gui/{uu6rwdtinkerwin2documents → frontwindowtdocuments/superant.com.tinkerwin2documents}/uu5documents.rwd +0 -0
  49. data/gui/{ub7rubyeval → frontwindowtdocuments/ub7rubyeval}/rubyeval.rwd +0 -0
  50. data/gui/{uk5rwddemodocuments → frontwindowtdocuments/uk5rwddemodocuments}/documents.rwd +0 -0
  51. data/gui/{vv1docshellxp → frontwindowtdocuments/vv1docshellxp}/vvdocshellxp.rwd +0 -0
  52. data/gui/{ww0documentsend → frontwindowtdocumentzend/superant.com.documentsend}/ww0documentend.rwd +0 -0
  53. data/gui/{wz6finaltabs → frontwindowz1end/frontwindowend}/xx0rwdfirsttab.rwd +0 -0
  54. data/gui/{ya1helpaboutbegin → helpaboutbegin/superant.com.helpaboutbegin}/ya0helpscreenstart.rwd +0 -0
  55. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/1appname.rwd +0 -0
  56. data/gui/{yg5rwdhelpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/3copyright.rwd +0 -0
  57. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.rwdwin2helpabout}/5version.rwd +0 -0
  58. data/gui/{yg5rwdhelpabout → helpaboutinstalled/superant.com.tinkerhelpabout}/1appname.rwd +0 -0
  59. data/gui/{yg6rwdwin2helpabout → helpaboutinstalled/superant.com.tinkerhelpabout}/3copyright.rwd +0 -0
  60. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +10 -0
  61. data/gui/{yl2rwddemohelpabout → helpaboutinstalled/yl2rwddemohelpabout}/1appname.rwd +0 -0
  62. data/gui/{yl2rwddemohelpabout → helpaboutinstalled/yl2rwddemohelpabout}/3copyright.rwd +0 -0
  63. data/gui/{yl2rwddemohelpabout → helpaboutinstalled/yl2rwddemohelpabout}/5version.rwd +0 -0
  64. data/gui/{yl4rwdshellhelpabout → helpaboutinstalled/yl4rwdshellhelpabout}/1appname.rwd +0 -0
  65. data/gui/{yl4rwdshellhelpabout → helpaboutinstalled/yl4rwdshellhelpabout}/3copyright.rwd +0 -0
  66. data/gui/{yl4rwdshellhelpabout → helpaboutinstalled/yl4rwdshellhelpabout}/5version.rwd +0 -0
  67. data/gui/{yy5helpaboutend → helpaboutzend/superant.com.helpaboutend}/helpscreenend.rwd +0 -0
  68. data/gui/tinkerbackwindows/superant.com.rwdcalc/1appname.rwd +4 -0
  69. data/gui/tinkerbackwindows/superant.com.rwdcalc/floatrwdcalc.rwd +23 -0
  70. data/gui/tinkerbackwindows/superant.com.rwdcalc/intrwdcalc.rwd +23 -0
  71. data/gui/tinkerbackwindows/superant.com.rwdcalc/z9end.rwd +6 -0
  72. data/gui/tinkerbackwindows/superant.com.tinercallablewindow/1appname.rwd +17 -0
  73. data/gui/{xa5rwdtinkercallablewindow → tinkerbackwindows/superant.com.tinercallablewindow}/9end.rwd +0 -0
  74. data/gui/{xb1rwdtinkerbackwindow → tinkerbackwindows/superant.com.tinkerbackwindow}/1appname.rwd +0 -0
  75. data/gui/{xb1rwdtinkerbackwindow → tinkerbackwindows/superant.com.tinkerbackwindow}/3arwddiagnostics.rwd +0 -0
  76. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40editconfiguration.rwd +36 -0
  77. data/gui/{xb1rwdtinkerbackwindow/4arwdlistapplets.rwd → tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd} +1 -1
  78. data/gui/{xb1rwdtinkerbackwindow/4arwdlistzips.rwd → tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistzips.rwd} +0 -0
  79. data/gui/{xb1rwdtinkerbackwindow/2tab1.rwd → tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd} +0 -0
  80. data/gui/{xb1rwdtinkerbackwindow → tinkerbackwindows/superant.com.tinkerbackwindow}/9backend.rwd +0 -0
  81. data/gui/{xa1versionwindow → tinkerbackwindows/superant.com.versionwindow}/1appname.rwd +0 -0
  82. data/gui/{za1applicationend → zzcoreguiend/tinkerapplicationguiend}/yy9rwdend.rwd +0 -0
  83. data/init.rb +6 -6
  84. data/installed/rwdviewlogo-0.4.inf +4 -0
  85. data/lang/en/rwdcore/languagefile.rb +10 -1
  86. data/lang/es/rwdcore/languagefile-es.rb +14 -0
  87. data/lang/jp/rwdcore/languagefile.rb +9 -0
  88. data/lang/nl/rwdcore/languagefile.rb +18 -3
  89. data/lang/templangfile.rb +14 -0
  90. data/lang/xlocallangfile.rb +16 -1
  91. data/rwd_files/HowTo_RwdCalc.txt +103 -0
  92. data/rwd_files/HowTo_Tinker.txt +66 -24
  93. data/rwd_files/tinker.png +0 -0
  94. data/tests/rwdtinkertestEN.rb +163 -0
  95. data/tests/test.result +32 -0
  96. data/zips/rwdahelloworld-0.5.zip +0 -0
  97. metadata +127 -82
  98. data/code/rwdcalc/ca4add.rb +0 -5
  99. data/configuration/aa0rwdframework.cnf +0 -13
  100. data/configuration/ab1tinkerwin2.cnf +0 -4
  101. data/configuration/ek0playscripts.cnf +0 -4
  102. data/extras/cal.rb +0 -166
  103. data/gui/aa2core/aa0rwdtop.rwd +0 -4
  104. data/gui/hx1rwdcalc/ca0rwdcalc.rwd +0 -19
  105. data/gui/tt0documentsbegin/tt0documentbegin.rwd +0 -6
  106. data/gui/xa5rwdtinkercallablewindow/1appname.rwd +0 -17
  107. data/gui/yg5rwdhelpabout/5version.rwd +0 -10
  108. data/lang/es/rwdcore/languagefile.rb +0 -3
  109. data/zips/rwdhelloworld-0.3.zip +0 -0
  110. data/zips/rwdwshell-0.91.zip +0 -0
  111. data/zips/wrubyslippers-0.93.zip +0 -0
data/Readme.txt CHANGED
@@ -1,21 +1,151 @@
1
- rwdapplications are web brower applications
1
+ = RwdTinker framework for RubyWebDialogs
2
2
 
3
- The GUI interface used is RubyWebDialogs
4
3
 
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/
4
+ RwdTinker is a web brower interface to and system for developing programs
5
+
6
+ == Usage
7
+
8
+
9
+ How to Use the Tinker framework Program (rwdtinker)
10
+
11
+
12
+ 1. stand alone application
13
+ 2. framework for building applications
14
+ 3. Open brower windows with html documents
15
+
16
+ The GUI interface used is RubyWebDialogs
6
17
 
7
18
 
8
- Start the program by:
9
- changing to the directory and
19
+ Start the program by typing
10
20
  ruby init.rb
11
21
 
12
22
  Then point your web browser to:
13
23
  http://localhost:7705/
14
24
 
15
- Or to the port that shows on the console or in the config.cnf file
16
25
 
17
- Requirements:
18
- RubyWebDialogs - I am using 0.0.11 2004-3-9
26
+ == Viewing installed Applets:
27
+
28
+
29
+ Go to "List Scripts" tab
30
+
31
+
32
+ You can get a list of all installed applets by clicking the listfiles button
33
+
34
+ To see the text of a install file
35
+ Type in the name of the file you want.
36
+
37
+ type it without the inf ending
38
+ rwdapplet-0.1
39
+
40
+ Then click the "View Installed File" button
41
+
42
+ If it finds the file it will open it. It displays the text the search box.
43
+
44
+ You can uninstall applets on this screen
45
+
46
+ == Installing Applets
47
+
48
+ click on the "Selection Panel"
49
+ click on Rwdtinker Back Window
50
+
51
+ You can download an applet created by someone else
52
+ put the file in the zips directory
53
+
54
+ click on the "list zips" tab
55
+ click on "list applets available for installing"
56
+
57
+ chose the applet you want
58
+ click on "install applet"
59
+ If all goes well the applet should be installed.
60
+ You will need to restart rwdtinker to see the new screens
61
+
62
+
63
+ == Changing configuration file
64
+
65
+ click on "Edit Configuration"
66
+ You can view the configuration file
67
+
68
+ You can edit the configuration
69
+
70
+ Remember to reload the configuration variables if you want your
71
+ changes used.
72
+
73
+ == Manually installing applets
74
+
75
+ * unzip an applet
76
+
77
+ unzip the applet into the program directoy
78
+ unzip randomapplet.zip
79
+
80
+ This should place the needed files in the correct directories
81
+
82
+
83
+ == Creating Applets
84
+
85
+ To add code, commands and gui tabs
86
+
87
+ Move program files into a directory under the code directory.
88
+ Move gui files into a directory under the gui directory.
89
+ The gui directory name you create is important, because the gui
90
+ rwd file is built in alpha order by directory name
91
+
92
+
93
+ There are two ways to add applets to the directories.
94
+
95
+ Creating code
96
+
97
+
98
+ * Manually write code and gui files
99
+
100
+ The files go into your code directory
101
+ the filenames for code do not matter
102
+
103
+ The gui files go into your gui directory
104
+ The gui files need to be in order by name and end with .rwd
105
+
106
+
107
+
108
+ If you need a config file that goes in the configuration directory
109
+
110
+ internationalization and localization are helped by replacing the
111
+ gui files in the subdirectories under gui
112
+
113
+
114
+ == Documents
115
+
116
+
117
+ when you click on a document name, the document should pop up in a
118
+ browser window, or in another browser tab.
119
+
120
+ To exit, press the x inside the browser window.
121
+
122
+ == Languages
123
+
124
+
125
+ You can add tranlations in the lang subdirectory
126
+ You change the $lang constant in Tinker config file in the configuration directory
127
+ You can see one translation on the install applet tab, after you have installed and applet
128
+
129
+ == Using over a Network
130
+
131
+ To serve the application over your local LAN,change the last line in the
132
+ init.rb file to something like:
133
+ RwdTinker.file(RWDFile).serve(8080, "-r" ? ".rwduids" : nil)
134
+ Then you should be able to login at: http://yourhostname:8080
135
+
136
+ You have to authorize yourself. The .rwuids example is a string with
137
+ the name of the authorization file, relative to the home directory
138
+ of the user that started the service. This file has to be in the form of:
139
+
140
+ user1 = password
141
+ user2 = pass phrase
142
+
143
+ Thus the file .rwduids might contain:
144
+
145
+ erik = secret
146
+
147
+ == Requirements:
148
+ RubyWebDialogs - I am using 0.1.2
19
149
  This package you downloaded should have a runtime version of
20
150
  the needed rubywebdialog files
21
151
 
@@ -23,21 +153,25 @@ Ruby I am using version 1.8.2
23
153
 
24
154
  I have tested this under Linux-Debian kernel 2.6.9
25
155
 
26
- Operation:
156
+ = Operation:
27
157
  The code files reside in the code directory and are combined before
28
158
  the main Class is loaded
29
159
 
30
160
  The rwd files in gui are combined before the gui is activated
31
161
 
32
- Trouble shooting:
162
+ Translated text reside in the lang directory
163
+
164
+ == Installing:
33
165
 
34
166
  untar the file
35
- tar zxvf rwdapplication-x.y.tar.gz
167
+ tar zxvf rwdtinker-x.y.tar.gz
36
168
  then cd to the directory
37
- cd rwdapplication-x.y
169
+ cd rwdshell-x.y
38
170
  then start the init.rb program file
39
171
  ruby init.rb
40
-
172
+ Then point your browser at http://localhost:7705
173
+ or where it tells you.
174
+ Trouble shooting:
41
175
 
42
176
  If the program is not working, try looking at the ev subdirectory. That is where
43
177
  the runtime of rubywebdialogs are.
@@ -52,6 +186,133 @@ Closing the browser doesn't terminate the application. You have to use the appli
52
186
 
53
187
  Don't use the back-button of the browser! Strange and unpredictable things may and will happen!
54
188
 
55
- Steven Gibson
56
- stevengibson@superant.com
57
- http://rwdapplications.rubyforge.org/
189
+ 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/
190
+
191
+ == Credits
192
+
193
+ Thanks go to:
194
+
195
+ * Matz, for creating Ruby in the first place.
196
+ * Erik, for creating RubyWebDialogs.
197
+ * Charlotte, my wife for coming up for the name Tinker.
198
+
199
+ == License
200
+
201
+ rwdtinker is copyright (c) 2004 Steven Gibson. It is free software, and may be redistributed
202
+ under the terms of the GPL licence:
203
+
204
+ == Contact
205
+ For more information see:
206
+ http://rwdapplications.rubyforge.org/wiki/wiki.pl
207
+
208
+
209
+ For more information about RubyWebDialogs see:
210
+ http://www.erikveen.dds.nl/rubywebdialogs/index.html
211
+
212
+ Thanks, Steven Gibson
213
+
214
+ == Changelog
215
+ version 1.44
216
+ updated directory structure - refactored gui files
217
+ Changed gui directory names - more like Java package titles
218
+
219
+ version 1.43
220
+ changed setup variables file for live changes
221
+ added editing and reloading of config file
222
+ added unzip filename to config file
223
+
224
+ version 1.42
225
+ update for live update system
226
+ update applets for live update
227
+ code file name cleanup
228
+
229
+ version 1.41
230
+ l10n work es,nl, jp
231
+ separated out languge.cnf
232
+ added zip applets refreshacpi, rwdcalc
233
+
234
+ version 1.40
235
+ removed extra lines from init.rb
236
+ fixed help second window
237
+ added some tranlations for Spanish
238
+ More work on l10n
239
+
240
+ version 1.3
241
+ refactored gui files to do easier i10n
242
+ removed lang directories under gui
243
+ added lang files under lang dir
244
+ removed redundant code files left from moving applet handling to back window
245
+ removed zipped applets not yet refactored
246
+
247
+ version 1.24
248
+ added internet usage instructions to HowTo_Tinker.txt
249
+ removed HowTo_Tinker.html
250
+ added panels for Helpabout
251
+ changed photo logo tab to only have embedded picture, no button
252
+
253
+ version 1.23
254
+ moving diagnostic tab and applet handling tabs to second window
255
+ added selection panel tab to choose secondary windows.
256
+
257
+ version 1.21
258
+ changing version on help screen to be button
259
+ added version window
260
+ added diagnostic tab
261
+
262
+ version 1.2
263
+ added gemspec for creating a rwdtinker.gem
264
+ added rdoc comments
265
+ changed order on remove applets tab
266
+
267
+ version 1.1
268
+ changed order of elements on install applet tab
269
+ Add more i81n ablility - added lang directorys for language hash files
270
+ added in test file using WATIR stands for "Web Application Testing In Ruby,
271
+
272
+ version 1.0
273
+ Improved name selection in zips and applet screens
274
+ added rubyslippers applet and rwdrefreshacpi applets as zips
275
+
276
+ version 0.9
277
+ Fixed bug introduced in 0.8 - code files not sorted correctly - class end was not in correct location
278
+ updated RubyWebDialogs for people who do not have it installed
279
+ added rwdschedule applet as zip file
280
+
281
+ version 0.8
282
+ changed location of code files
283
+ only directory of code files needs to be added to inf file
284
+ changed location of gui files
285
+ only directory of gui files needs to be added to inf file
286
+ Added constants in conf file for code location and gui location
287
+ removed all zips not yt updated to new directory layout
288
+ change loading of conf files to not need intermediate file
289
+ and favicon.ico
290
+
291
+ version 0.7
292
+ moved changelog to HowTo_Tinker.html
293
+ copied english gui text to the dirs I think we should translate to
294
+ update backup zip files to newest versions
295
+ upgraded the ev directory - for those who don't have RubyWebDialogs
296
+
297
+ version 0.6
298
+ updated version number
299
+ changed merge name to rwdtinker.rb
300
+
301
+ version 0.4
302
+ added zip listing and installing - Linux only
303
+
304
+ Version 0,3
305
+ changed name to Tinker
306
+
307
+ Version 0.2
308
+ added some i18n directories for the gui files
309
+
310
+ Version 0.1
311
+ first public version released
312
+ includes document screen
313
+ Open Photo screen
314
+ included configuration directory
315
+ zips directories
316
+ installed directory
317
+ installed applet lister
318
+
@@ -0,0 +1,4 @@
1
+ def viewphoto
2
+ @rwd_window = "photo"
3
+
4
+ end
@@ -1,5 +1,10 @@
1
1
 
2
- def multiply
2
+ def rwdmultiply
3
3
  @result = "%s * %s = %s" % [@a_calc, @b_calc, @a_calc.to_i*@b_calc.to_i]
4
+
5
+ $runningtotal += @result + "\n"
6
+
7
+ @runningtape = $runningtotal
8
+ @a_calc = "%s" % [@a_calc.to_i*@b_calc.to_i]
4
9
  end
5
10
 
@@ -0,0 +1,10 @@
1
+
2
+ def frwdadd
3
+ @fresult = "%s + %s = %s" % [@a_fcalc, @b_fcalc, @a_fcalc.to_f+@b_fcalc.to_f]
4
+
5
+ $frunningtotal += @fresult + "\n"
6
+
7
+ @frunningtape = $frunningtotal
8
+ @a_fcalc = "%s" % [@a_fcalc.to_f+@b_fcalc.to_f]
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+
2
+ def frwdcleartape
3
+
4
+
5
+ $frunningtotal = " "
6
+
7
+ @frunningtape = $frunningtotal
8
+ end
9
+
@@ -0,0 +1,10 @@
1
+
2
+ def frwddivide
3
+ @fresult = "%s / %s = %s" % [@a_fcalc, @b_fcalc, @a_fcalc.to_f/@b_fcalc.to_f]
4
+
5
+ $frunningtotal += @fresult + "\n"
6
+
7
+ @frunningtape = $frunningtotal
8
+ @a_fcalc = "%s" % [@a_fcalc.to_f/@b_fcalc.to_f]
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+
2
+ def frwdmultiply
3
+ @fresult = "%s * %s = %s" % [@a_fcalc, @b_fcalc, @a_fcalc.to_f*@b_fcalc.to_f]
4
+
5
+ $frunningtotal += @fresult + "\n"
6
+
7
+ @frunningtape = $frunningtotal
8
+ @a_fcalc = "%s" % [@a_fcalc.to_f*@b_fcalc.to_f]
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+
2
+ def frwdsubtract
3
+ @fresult = "%s - %s = %s" % [@a_fcalc, @b_fcalc, @a_fcalc.to_f-@b_fcalc.to_f]
4
+
5
+ $frunningtotal += @fresult + "\n"
6
+
7
+ @frunningtape = $frunningtotal
8
+ @a_fcalc = "%s" % [@a_fcalc.to_f-@b_fcalc.to_f]
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+ # Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a contact book
3
+ # For more information about see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the window
6
+ def runrwdcalcwindow
7
+ @rwd_window = "rwdcalcwindow"
8
+ end
9
+
@@ -0,0 +1,10 @@
1
+
2
+ def rwdadd
3
+ @result = "%s + %s = %s" % [@a_calc, @b_calc, @a_calc.to_i+@b_calc.to_i]
4
+
5
+ $runningtotal += @result + "\n"
6
+
7
+ @runningtape = $runningtotal
8
+ @a_calc = "%s" % [@a_calc.to_i+@b_calc.to_i]
9
+ end
10
+
@@ -0,0 +1,9 @@
1
+
2
+ def rwdcleartape
3
+
4
+
5
+ $runningtotal = " "
6
+
7
+ @runningtape = $runningtotal
8
+ end
9
+
@@ -0,0 +1,10 @@
1
+
2
+ def rwddivide
3
+ @result = "%s / %s = %s" % [@a_calc, @b_calc, @a_calc.to_i/@b_calc.to_i]
4
+
5
+ $runningtotal += @result + "\n"
6
+
7
+ @runningtape = $runningtotal
8
+ @a_calc = "%s" % [@a_calc.to_i/@b_calc.to_i]
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+
2
+ def rwdsubtract
3
+ @result = "%s - %s = %s" % [@a_calc, @b_calc, @a_calc.to_i-@b_calc.to_i]
4
+
5
+ $runningtotal += @result + "\n"
6
+
7
+ @runningtape = $runningtotal
8
+ @a_calc = "%s" % [@a_calc.to_i-@b_calc.to_i]
9
+ end
10
+
@@ -3,9 +3,10 @@
3
3
  nametext = "%s" % [@a_installapplet]
4
4
 
5
5
  begin # exception trapped block
6
- fileName = "zips/" + nametext + ".zip"
6
+ fullname = nametext + ".zip"
7
+ fileName = File.join($zipslocation,fullname)
7
8
 
8
- commandline = "unzip -o " + fileName
9
+ commandline = $unzipprogram + fileName
9
10
  system( commandline+' > temp.output' )
10
11
 
11
12
 
@@ -1,7 +1,9 @@
1
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")
2
+ def listzipfilestoinstall
3
+ if File.exist?($zipslocation)
4
+ fileList = Dir.new($zipslocation).entries.sort.delete_if { |x| ! (x =~ /zip$/) }
5
+ @zipslistresult = fileList.rwd_method("fillziptoinstallname")
6
+ end
5
7
  end
6
8
 
7
9
  def fillziptoinstallname(inffile)
@@ -0,0 +1,32 @@
1
+ # this method views an existing address record
2
+ def loadconfigurationrecord
3
+
4
+ require 'fileutils'
5
+ if TinkerWin2ConfigurationFileName
6
+ @a_configurationfilename = TinkerWin2ConfigurationFileName
7
+ end
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join(ConfigurationDir, TinkerWin2ConfigurationFileName)
13
+
14
+ fd = File.open(fileName,"r")
15
+ @a_configline1= fd.readline.chomp
16
+ @a_configline2 = fd.readline.chomp
17
+ @a_configline3 = fd.readline.chomp
18
+ @a_configline4 = fd.readline.chomp
19
+ @a_configline5 = fd.readline.chomp
20
+ @a_configline6 = fd.readline.chomp
21
+ @a_configline7 =fd.readline.chomp
22
+ @a_configline8 = fd.readline.chomp
23
+
24
+ while ! fd.eof?
25
+ @extraconfigdatadisplay = fd.readline
26
+ end
27
+ fd.close
28
+ rescue SystemCallError, StandardError
29
+ $stderr.print "system call error: " + $!
30
+ end # exception rescue
31
+
32
+ end
@@ -0,0 +1,13 @@
1
+ # this method clears the on screen variables
2
+ def loadconfigurationvariables
3
+
4
+ configfiletoload = File.join(ConfigurationDir,TinkerWin2ConfigurationFileName)
5
+ begin
6
+ load configfiletoload
7
+ @extraconfigdatadisplay = ""
8
+ @newconfigurationresult = "Config Variables loaded"
9
+ rescue
10
+ @extraconfigdatadisplay = ""
11
+ @newconfigurationresult = "loading error"
12
+ end
13
+ end
@@ -1,4 +1,4 @@
1
- def openname
1
+ def openappletname
2
2
  require 'fileutils'
3
3
  nametext = "%s" % [@a_installlist]
4
4
 
@@ -0,0 +1,18 @@
1
+ # this method adds a new address record
2
+ def saveconfigurationrecord
3
+ require 'fileutils'
4
+ if @a_configurationfilename
5
+ newname = "%s" % [@a_configurationfilename] # grab the filename to create
6
+ 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"
7
+
8
+ begin # exception trapped block
9
+ fileName = File.join( ConfigurationDir, newname )
10
+ fd = File.open(fileName,"w")
11
+ fd.print(newdata) # save the record info to the file
12
+ fd.close
13
+ @newconfigurationresult=newdata # show the record info in the browser
14
+ rescue SystemCallError, StandardError
15
+ $stderr.print "system call error: " + $!
16
+ end # exception rescue
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+
2
+ #$lang = "jp"
3
+ $lang= "en"
4
+ #$lang= "nl"
5
+ #$lang= "es"
@@ -0,0 +1,3 @@
1
+
2
+ $frunningtotal = ""
3
+ $runningtotal = ""
@@ -0,0 +1,2 @@
1
+
2
+ RwdcalcVersion = "0.3"
@@ -0,0 +1,2 @@
1
+
2
+ RwdDemoVersion = "0.8"
@@ -0,0 +1,4 @@
1
+
2
+ "
3
+ $shellscript_directory = "scripts"
4
+ RwdShellVersion = "0.92"
@@ -0,0 +1,2 @@
1
+
2
+ RwdShellVersion = "0.92"
@@ -0,0 +1,12 @@
1
+
2
+ ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
+ CodeName = "rwdtinker"
4
+ CodeNameFile = CodeName + ".rb"
5
+ LangNameFile = "rwdlanguage.rb"
6
+ RWDFile = "rwdtinker.rwd"
7
+ LangDir = "lang"
8
+ TempLangHashFile = LangDir + "/" + "templangfile.rb"
9
+ LocalLangHashFile = LangDir + "/" + "xlocallangfile.rb"
10
+ CodeDir = "code"
11
+ GuiDir = "gui"
12
+ $port = 7705
@@ -0,0 +1,2 @@
1
+
2
+ RwdTinkerVersion = "1.44"
@@ -0,0 +1,8 @@
1
+
2
+ TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
3
+ $zipslocation = "zips" # location of applets to add
4
+ $unzipprogram = "unzip -o "
5
+
6
+
7
+
8
+
@@ -0,0 +1,3 @@
1
+
2
+ RwdTinkerWin2Version = "0.7"
3
+
@@ -0,0 +1,4 @@
1
+ $rwdguivar=
2
+ "<application>
3
+ <window name=\"main\" title=\"Tinker - RubyWebDialogs\">
4
+ <tabs>"