bigtinker 0.96 → 0.97

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/code/01rwdcore/02helptexthashbegin.rb +10 -0
  2. data/code/01rwdcore/03helptexthash.rb +18 -20
  3. data/code/01rwdcore/runopentinkerdocument.rb +1 -1
  4. data/code/superant.com.foldeditor/0uninstallapplet.rb +17 -0
  5. data/code/superant.com.foldeditor/changehypernotename.rb +21 -0
  6. data/code/superant.com.foldeditor/chooselinkfile.rb +6 -0
  7. data/code/superant.com.foldeditor/choosenotefile.rb +6 -0
  8. data/code/superant.com.foldeditor/clearnotescreen.rb +7 -0
  9. data/code/superant.com.foldeditor/createnewnotehtml.rb +31 -0
  10. data/code/superant.com.foldeditor/helptexthashload.rb +22 -0
  11. data/code/superant.com.foldeditor/hyperlinkcreatelinkfile.rb +19 -0
  12. data/code/superant.com.foldeditor/launchfoldeditorurl.rb +19 -0
  13. data/code/superant.com.foldeditor/listfoldeditorfiles.rb +7 -0
  14. data/code/{superant.com.rwdaddresses → superant.com.foldeditor}/loadconfigurationrecord.rb +4 -4
  15. data/code/superant.com.foldeditor/loadconfigurationvariables.rb +14 -0
  16. data/code/superant.com.foldeditor/loadfolddocument.rb +18 -0
  17. data/code/superant.com.foldeditor/loadnextnote.rb +32 -0
  18. data/code/superant.com.foldeditor/loadprevnote.rb +32 -0
  19. data/code/superant.com.foldeditor/loadrwdfoldeditlinkfile.rb +19 -0
  20. data/code/superant.com.foldeditor/openhelpwindowrwdhyernote.rb +30 -0
  21. data/code/superant.com.foldeditor/runrwdapplet.rb +10 -0
  22. data/code/superant.com.foldeditor/rwddisplayfoldlinks.rb +41 -0
  23. data/code/{superant.com.rwdaddresses/rwdaddresseshelpabout.rb → superant.com.foldeditor/rwdtinkerversion.rb} +4 -4
  24. data/code/superant.com.foldeditor/saveconfigurationrecord.rb +20 -0
  25. data/code/superant.com.foldeditor/savefoldlinkfile.rb +20 -0
  26. data/code/superant.com.foldeditor/savehtmlhypernoterecord.rb +20 -0
  27. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +30 -105
  28. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +1 -3
  29. data/configuration/bigtinker.dist +2 -2
  30. data/configuration/rwdtinker.dist +3 -3
  31. data/configuration/rwdwfoldeditor.dist +16 -0
  32. data/configuration/tinkerwin2variables.dist +7 -2
  33. data/gui/tinkerbackwindows/superant.com.foldeditor/10appletbegin.rwd +4 -0
  34. data/gui/tinkerbackwindows/superant.com.foldeditor/10aviewnote.rwd +36 -0
  35. data/gui/tinkerbackwindows/superant.com.foldeditor/15htmlview.rwd +43 -0
  36. data/gui/tinkerbackwindows/superant.com.foldeditor/56viewfold.rwd +43 -0
  37. data/gui/tinkerbackwindows/superant.com.foldeditor/67viewconfiguration.rwd +27 -0
  38. data/gui/tinkerbackwindows/superant.com.foldeditor/81jumplinkcommands.rwd +17 -0
  39. data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefresh.rwd +13 -0
  40. data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefreshacpi.rwd +11 -0
  41. data/gui/tinkerbackwindows/{superant.com.rwdaddressessyncbackwindow/zvbackend.rwd → superant.com.slideshow/9end.rwd} +1 -1
  42. data/init.rb +54 -163
  43. data/installed/rwdwfoldeditor.inf +11 -0
  44. data/lang/en/rwdcore/en.po +166 -0
  45. data/lang/es/rwdcore/es.po +172 -0
  46. data/lang/fr/rwdcore/fr.po +166 -0
  47. data/lang/hi/rwdcore/hi.po +170 -0
  48. data/lang/ja/rwdcore/ja.po +168 -0
  49. data/lang/nl/rwdcore/nl.po +166 -0
  50. data/lib/rwdtinker/rwdcodedir.rb +56 -0
  51. data/lib/rwdtinker/rwdguidir.rb +57 -0
  52. data/lib/rwdtinker/rwdlangdir.rb +60 -0
  53. data/lib/rwdtinker/rwdtinkertools.rb +2 -1
  54. data/rwd_files/HowTo_BigTinker.txt +3 -0
  55. data/rwd_files/HowTo_FoldEditor.txt +131 -0
  56. data/rwd_files/HowTo_Tinker.txt +20 -6
  57. data/rwd_files/Tinkerhelptexthash.txt +81 -0
  58. data/rwd_files/default.fld +9 -0
  59. data/rwd_files/rubylinks.fld +6 -0
  60. data/rwd_files/rwdfoldeditorhelpfiles.txt +42 -0
  61. data/rwd_files/rwdhypernote-0.13.fld +202 -0
  62. data/tests/{makedist-rwdwaddesses.rb → makedist-rwdwfoldeditor.rb} +8 -4
  63. data/tests/makedist.rb +1 -1
  64. data/zips/rwdwfoldeditor-0.06.zip +0 -0
  65. data/zips/rwdwmovies-0.98.zip +0 -0
  66. data/zips/tinkerbellw-0.03.zip +0 -0
  67. data/zips/{wrubyslippers-1.07.zip → wrubyslippers-1.08.zip} +0 -0
  68. metadata +67 -83
  69. data/code/01rwdcore/04helptextend.rb +0 -6
  70. data/code/superant.com.rwdaddresses/0uninstallapplet.rb +0 -14
  71. data/code/superant.com.rwdaddresses/attachtmpcontactphoto.rb +0 -24
  72. data/code/superant.com.rwdaddresses/clearscreendisplay.rb +0 -15
  73. data/code/superant.com.rwdaddresses/createnewnamerecord.rb +0 -19
  74. data/code/superant.com.rwdaddresses/deletecontactrecord.rb +0 -25
  75. data/code/superant.com.rwdaddresses/deleterwdaddressesupdatefiles.rb +0 -19
  76. data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +0 -36
  77. data/code/superant.com.rwdaddresses/helptexthashrwdaddresses.rb +0 -69
  78. data/code/superant.com.rwdaddresses/listnamerecord.rb +0 -15
  79. data/code/superant.com.rwdaddresses/listvcardrecord.rb +0 -15
  80. data/code/superant.com.rwdaddresses/loadconfigurationvariables.rb +0 -15
  81. data/code/superant.com.rwdaddresses/loadnamerecord.rb +0 -30
  82. data/code/superant.com.rwdaddresses/openhelpwindowrwdaddresses.rb +0 -30
  83. data/code/superant.com.rwdaddresses/renamecontact.rb +0 -15
  84. data/code/superant.com.rwdaddresses/runaddresseswindow.rb +0 -10
  85. data/code/superant.com.rwdaddresses/runrwdaddressesmenu1.rb +0 -34
  86. data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +0 -10
  87. data/code/superant.com.rwdaddresses/rwdaddressesbackwindow.rb +0 -10
  88. data/code/superant.com.rwdaddresses/saveconfigurationrecord.rb +0 -20
  89. data/code/superant.com.rwdaddresses/savevcardrecord.rb +0 -76
  90. data/code/superant.com.rwdaddresses/syncrwdaddress.rb +0 -28
  91. data/code/superant.com.rwdaddresses/test_cases.rb +0 -45
  92. data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +0 -30
  93. data/code/superant.com.rwdaddresses/viewaddressconfiguration.rb +0 -21
  94. data/code/superant.com.rwdaddresses/viewnamedata.rb +0 -28
  95. data/code/superant.com.rwdaddresses/viewphoto.rb +0 -4
  96. data/code/superant.com.rwdaddresses/viewrwdaddressesconfiguration.rb +0 -23
  97. data/code/superant.com.rwdaddresses/viewtmpcontactphoto.rb +0 -12
  98. data/code/superant.com.rwdaddresses/viewvcarddata.rb +0 -22
  99. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -61
  100. data/configuration/language.dist +0 -8
  101. data/configuration/rwdapplicationidentity.dist +0 -3
  102. data/configuration/rwdwaddresses.dist +0 -24
  103. data/gui/tinkerbackwindows/superant.com.addressesphotowindow/yy7addressesphoto.rwd +0 -6
  104. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +0 -5
  105. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +0 -45
  106. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd +0 -23
  107. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/87viewconfiguration.rwd +0 -34
  108. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +0 -11
  109. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +0 -15
  110. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd +0 -3
  111. data/installed/rwdaddressesdata2.inf +0 -7
  112. data/installed/rwdwaddresses.inf +0 -13
  113. data/lang/en/rwdcore/languagefile.rb +0 -59
  114. data/lang/es/rwdcore/languagefile-es.rb +0 -63
  115. data/lang/fr/rwdcore/languagefile.rb +0 -65
  116. data/lang/jp/rwdcore/languagefile.rb +0 -73
  117. data/lang/nl/rwdcore/languagefile.rb +0 -76
  118. data/names/Angelina Jolie.jpg +0 -0
  119. data/names/Angelina Jolie.nam +0 -8
  120. data/names/Angelina Jolie.vcf +0 -8
  121. data/names/Steven Gibson.jpg +0 -0
  122. data/names/Steven Gibson.nam +0 -5
  123. data/names/elektra.jpg +0 -0
  124. data/names/elektra.nam +0 -7
  125. data/names/nophoto.jpg +0 -0
  126. data/rwd_files/HowTo_Addresses.txt +0 -272
  127. data/rwd_files/contacttmp.jpg +0 -0
  128. data/updates/temp.rb +0 -1
  129. data/zips/rwdwaddresses-1.07.zip +0 -0
  130. data/zips/rwdwfoldeditor-0.05.zip +0 -0
  131. data/zips/rwdwgutenberg-0.11.zip +0 -0
  132. data/zips/rwdwhypernote-0.15.zip +0 -0
  133. data/zips/rwdwtorrent-0.07.zip +0 -0
  134. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.foldeditor}/9end.rwd +0 -0
  135. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/10appletbegin.rwd +0 -0
  136. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/11viewnamedata.rwd +0 -0
  137. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/13listnamerecordfiles.rwd +0 -0
  138. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/16editrecord.rwd +0 -0
  139. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/17viewvcardrecord.rwd +0 -0
  140. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/18contactutilities.rwd +0 -0
  141. /data/gui/tinkerbackwindows/{superant.com.rwdaddresses → superant.com.slideshow}/81jumplinkcommands.rwd +0 -0
@@ -2,3 +2,13 @@
2
2
 
3
3
  Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Identificador de mensaje desconocido: #{kk.inspect}."; hh[kk] }
4
4
  helpmessage = {
5
+ :general_help => "You can work with Applets: go to 'Selection tab', <br>
6
+ On that back screen you will find:<br>
7
+ List Applets: you can see and delete installed applets<br>
8
+ List Zips: you can see lists of applets that you can install<br>
9
+ Edit Configuration: You can view the rwdtinker configuration and change it<br>
10
+ Diagnostic Tab: You can view the environments variables that rwdtinker is running with<br>
11
+ "
12
+
13
+ }
14
+ helpmessage.each { |kk, vv| Helptext[kk] = vv }
@@ -1,23 +1,21 @@
1
- # Help files for RwdTinker core
1
+ # this code loads the help text
2
2
 
3
-
4
- :general_help => "You can work with Applets: go to 'Selection tab', <br>
5
- On that back screen you will find:<br>
6
- List Applets: you can see and delete installed applets<br>
7
- List Zips: you can see lists of applets that you can install<br>
8
- Edit Configuration: You can view the rwdtinker configuration and change it<br>
9
- Diagnostic Tab: You can view the environments variables that rwdtinker is running with<br>
10
- ",
11
- :network_help => "Using over a Network: To serve the application over your local LAN,change the last line in the<br>
12
- init.rb file to something like:\n<br>
13
- RwdTinker.file(RWDFile).serve(8080, '-r' ? '.rwduids' : nil)\n<br>
14
- Then you should be able to login at: http://yourhostname:8080",
3
+
4
+ tmphelpfilename = "Tinkerhelptexthash.txt"
5
+ tmphelpdir = "rwd_files"
6
+
7
+ begin # exception trapped block
8
+
9
+
10
+ fileName = File.join(tmphelpdir ,tmphelpfilename )
11
+
12
+
13
+ fd = File.open(fileName,"r")
14
+ tmphelptext = fd.read
15
+ fd.close
16
+ eval tmphelptext
17
+ rescue SystemCallError, StandardError
18
+ $rwdtinkerlog.error "Tinkerbell help file load: system call error: "
19
+ end # exception rescue
15
20
 
16
-
17
- :documents_rwdtinker => "<b>Documents:
18
- <p>
19
21
 
20
- when you click on a document name, the document should pop up in a <br>
21
- browser window, or in another browser tab.</b>
22
- "
23
-
@@ -1,7 +1,7 @@
1
1
  # open document for rwdtinker application
2
2
  def runopentinkerdocument
3
3
 
4
- tinkerdocumenturl = "http://localhost:7705/" + @a_tinkerdocumentinput
4
+ tinkerdocumenturl = "http://localhost:#{$port}/" + @a_tinkerdocumentinput
5
5
  Thread.new( tinkerdocumenturl){ |t| `#{Browser_Exe} #{tinkerdocumenturl}` }
6
6
  end
7
7
 
@@ -0,0 +1,17 @@
1
+
2
+ def rwdwfoldeditor()
3
+ $tinkerdocumentsarray.delete_if {|x| x == "HowTo_FoldEditor.txt"}
4
+ $tinkerhelpaboutarray.delete_if {|x| x == "RwdFoldEditor"}
5
+ Helptext.delete_if {|key, value| key == :rwdfoldeditor_generalhelp}
6
+ Helptext.delete_if {|key, value| key == :foldlinkview_help }
7
+ Helptext.delete_if {|key, value| key == :foldlinkutility_help }
8
+ $rwdjumplink.delete_if {|x| x == "RwdFoldEditor"}
9
+
10
+ if DeleteFoldEditorConfig
11
+
12
+ fileName = File.join("configuration","rwdwfoldeditor.cnf")
13
+ File.delete(fileName)
14
+ end
15
+ return true
16
+
17
+ end
@@ -0,0 +1,21 @@
1
+ # this code is to change the note name
2
+ def changehypernotedata
3
+ if ! @a_changehypernotedata.empty?
4
+ if ! @a_viewhypernote.empty?
5
+ oldName = @a_viewhypernote + ".txt"
6
+
7
+
8
+ newName = @a_changehypernotedata + ".txt"
9
+ if File.exist?(oldName)
10
+ File.rename(oldName, newName)
11
+ oldlinkName = @a_viewhypernote + ".lnk"
12
+ newlinkName = @a_changehypernotedata + ".lnk"
13
+ if File.exist?(oldlinkName)
14
+ File.rename(oldlinkName, newlinkName)
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+
@@ -0,0 +1,6 @@
1
+ # this method clears the on screen variables
2
+ def chooselinkfile
3
+ @a_viewfoldlinkfile = @a_foldeditorlinkinput
4
+ $foldeditor_linkfile = @a_viewfoldlinkfile
5
+
6
+ end
@@ -0,0 +1,6 @@
1
+ # this method clears the on screen variables
2
+ def choosefoldnotefile
3
+ @a_viewfoldlink = @a_viewfoldlinktmp
4
+
5
+
6
+ end
@@ -0,0 +1,7 @@
1
+ # this method clears the on screen variables
2
+
3
+ def clearfoldnote
4
+ @folddocumentresult = ""
5
+
6
+
7
+ end
@@ -0,0 +1,31 @@
1
+ #create a new note
2
+ def rwdfoldeditcreatenewnote
3
+
4
+ @rwd_call_after_back << "reloadtab"
5
+ if @rwd_tab == "viewrwdfoldeditorfile" # we are on the link file edit tab
6
+
7
+ if @a_foldeditorlinkfile.empty? # nothing has been typed in the text box
8
+ newnotecontent = 'new links'
9
+ else
10
+ newnotecontent = @a_foldeditorlinkfile.to_s
11
+ end
12
+ if @a_viewfoldlinkfile.empty? # no title is listed
13
+ newnotefilename = "newlinks.fld" # create a fold link file
14
+ else
15
+ newnotefilename = @a_viewfoldlinkfile.to_s
16
+ end
17
+ else # we are on the note edit tab
18
+ if @folddocumentresult.empty?
19
+ newnotecontent = 'new note'
20
+ else
21
+ newnotecontent = @folddocumentresult.to_s
22
+ end
23
+ newnotefilename = "newnote.txt" # arbitrary file name
24
+
25
+ end
26
+
27
+ $reloadaftercreate = true
28
+ download("#{newnotecontent}", "#{newnotefilename}")
29
+
30
+ end
31
+
@@ -0,0 +1,22 @@
1
+ # this code loads the help text
2
+
3
+
4
+ tmphelpfilename = "rwdfoldeditorhelpfiles.txt"
5
+ tmphelpdir = "rwd_files"
6
+
7
+ begin # exception trapped block
8
+
9
+
10
+ fileName = File.join(tmphelpdir ,tmphelpfilename )
11
+
12
+
13
+ fd = File.open(fileName,"r")
14
+ tmphelptext = fd.read
15
+ fd.close
16
+ eval tmphelptext
17
+
18
+ rescue SystemCallError, StandardError
19
+ $rwdtinkerlog.error "foldeditor help file load: system call error: "
20
+ end # exception rescue
21
+
22
+
@@ -0,0 +1,19 @@
1
+ # this method adds a new address record or saves changes
2
+ def hyperlinkcreatelinkfile
3
+ require 'fileutils'
4
+ if ! @a_viewhypernote.empty?
5
+ newname = "%s" % [@a_viewhypernote] # grab the new filename to create
6
+
7
+ fullnewname = newname + ".lnk"
8
+ @a_viewlinksnote = fullnewname
9
+ begin # exception trapped block
10
+
11
+ fd = File.open(fullnewname,"w")
12
+
13
+ fd.close
14
+ @createnewnamerecorddisplay=newdata # show the record info in the browser
15
+ rescue SystemCallError, StandardError
16
+ $stderr.print "system call error: " + $!
17
+ end # exception rescue
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # launch the browser with a url
2
+ def foldeditorlaunchurl
3
+
4
+ url1 = File.expand_path( @a_viewfoldlink.to_s.strip )
5
+
6
  url = "file://#{url1}"
7
+
8
+
9
+ `#{$foldeditorbrowser} "#{url}"`
10
+
11
+ end
12
+
13
+ def foldeditorlaunchhttp
14
+
15
+ url = @a_viewfoldlink.to_s.strip
16
+
17
+
18
+ `#{$foldeditorbrowser} "#{url}"`
19
+
20
+ end
@@ -0,0 +1,7 @@
1
+ # this code is to list the fold files that are available
2
+ def loadfoldeditorlinkfilelist
3
+
4
+ fileList = Dir.new($rwdfoldeditor_directory).entries.sort.delete_if { |x| ! (x =~ /fld$/) }
5
+ @foldeditorlinkfiles = fileList.rwd_options
6
+ end
7
+
@@ -1,19 +1,19 @@
1
1
  # this method puts the configuration rexord on the screen
2
- def loadrwdaddressesconfiguration
2
+ def loadrwdfoldeditorconfiguration
3
3
 
4
4
  require 'fileutils'
5
5
 
6
- @a_adconfigurationfilename = "rwdwaddresses.cnf"
6
+ @a_foldeditconfigurationfilename = "rwdwfoldeditor.cnf"
7
7
 
8
8
 
9
9
  begin # exception trapped block
10
10
 
11
11
  Dir.chdir($progdir)
12
- fileName = File.join(ConfigurationDir, @a_adconfigurationfilename )
12
+ fileName = File.join(ConfigurationDir, @a_foldeditconfigurationfilename )
13
13
 
14
14
 
15
15
  fd = File.open(fileName,"r")
16
- @a_adconfigurationfile= fd.read
16
+ @a_foldeditconfigurationfile= fd.read
17
17
  fd.close
18
18
  rescue SystemCallError, StandardError
19
19
  $stderr.print "system call error: " + $!
@@ -0,0 +1,14 @@
1
+ # this method loads the on screen variables into the running class
2
+ def loadrwdfoldeditorconfigurationvariables
3
+
4
+ tmpfilename = "rwdwfoldeditor.cnf"
5
+ configfiletoload = File.join(ConfigurationDir, tmpfilename )
6
+ begin
7
+ load configfiletoload
8
+ @extrahypconfigdatadisplay = ""
9
+ @newhypconfigurationresult = "Config Variables loaded"
10
+ rescue
11
+ @extrahypconfigdatadisplay = ""
12
+ @newhypconfigurationresult = "loading error"
13
+ end
14
+ end
@@ -0,0 +1,18 @@
1
+ # this method views an existing record
2
+ def loadfolddocument
3
+
4
+ require 'fileutils'
5
+
6
+ begin # exception trapped block
7
+
8
+ fileName = @a_viewfoldlink
9
+
10
+ fd = File.open(fileName,"r")
11
+ @folddocumentresult = fd.read
12
+
13
+ fd.close
14
+ rescue SystemCallError, StandardError
15
+ $stderr.print "system call error: " + $!
16
+ end # exception rescue
17
+
18
+ end
@@ -0,0 +1,32 @@
1
+ # this method views next record
2
+
3
+ def loadnextfoldnote
4
+ if @a_viewfoldlink > ""
5
+ if @a_viewfoldlinkfile
6
+ if !@a_viewfoldlinkfile.empty? # a fold link file has been selected
7
+
8
+ fileName = File.join($rwdfoldeditor_directory, @a_viewfoldlinkfile.to_s.strip)
9
+ tmpfilearray = []
10
+ begin
11
+ File.open(fileName).each { |line|
12
+ if ! line.strip.empty?
13
+ tmpfilearray << line.strip
14
+ end
15
+ }
16
+ rescue
17
+ if $DEBUG
18
+ $stderr.puts "file error in dispfoldlinks"
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ tmpindex = tmpfilearray.index(@a_viewfoldlink.to_s.strip)
25
+ $stderr.puts tmpindex.to_s
26
+ if tmpfilearray.length > tmpindex + 1
27
+ @a_viewfoldlink = tmpfilearray[tmpindex+1].to_s.strip
28
+
29
+ loadfolddocument # load the file
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # this method views next record
2
+
3
+ def loadprevfoldnote
4
+ if @a_viewfoldlink > ""
5
+ if @a_viewfoldlinkfile
6
+ if !@a_viewfoldlinkfile.empty? # a fold link file has been selected
7
+
8
+ fileName = File.join($rwdfoldeditor_directory, @a_viewfoldlinkfile.to_s.strip)
9
+ tmpfilearray = []
10
+ begin
11
+ File.open(fileName).each { |line|
12
+ if ! line.strip.empty?
13
+ tmpfilearray << line.strip
14
+ end
15
+ }
16
+ rescue
17
+ if $DEBUG
18
+ $stderr.puts "file error in dispfoldlinks"
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ tmpindex = tmpfilearray.index(@a_viewfoldlink.to_s.strip)
25
+ $stderr.puts tmpindex.to_s
26
+ if tmpindex - 1 > -1
27
+ @a_viewfoldlink = tmpfilearray[tmpindex - 1].to_s.strip
28
+
29
+ loadfolddocument # load the file
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,19 @@
1
+ # this method views an existing fold link file
2
+ def loadrwdfoldeditlinkfile
3
+
4
+ require 'fileutils'
5
+
6
+ begin # exception trapped block
7
+
8
+ fileName = File.join($rwdfoldeditor_directory,@a_viewfoldlinkfile)
9
+
10
+ fd = File.open(fileName,"r")
11
+ @a_foldeditorlinkfile = fd.read
12
+
13
+
14
+ fd.close
15
+ rescue SystemCallError, StandardError
16
+ $stderr.print "system call error: " + $!
17
+ end # exception rescue
18
+
19
+ end
@@ -0,0 +1,30 @@
1
+ # this code is to call the help window
2
+ def runhelpwindowrwdfoldeditor
3
+
4
+ $help_topic = "rwdfoldeditor_generalhelp"
5
+
6
+ if @rwd_tab == "viewrwdfoldeditorfile"
7
+ $help_topic = "foldlinkutility_help"
8
+ end
9
+
10
+ if @rwd_tab == "superantcomfoldeditor"
11
+ $help_topic = "foldlinkview_help"
12
+ end
13
 
14
+ if @rwd_tab == "superantcomfoldeditorview"
15
+
16
+ $help_topic = "rwdfoldeditor_generalhelp"
17
+ end
18
+
19
+
20
+ $helptopicsarray = $helptopicsarray | ["rwdfoldeditor_generalhelp","foldlinkview_help","foldlinkutility_help"]
21
+
22
+
23
+
24
+ if @rwd_window != "rwdtinkerhelpwindow"
25
+ $previouswindow = @rwd_window
26
+ $previoustab = @rwd_tab
27
+ end
28
+ runhelpwindow
29
+ end
30
+
31
+
@@ -0,0 +1,10 @@
1
+ # Application rwdtinker orginally (c) 2004 Steven Gibson under GPL.
2
+ #
3
+ # For more information about see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ # call the window
6
+ def runrwdfoldeditorwindow
7
+ @rwd_window = "rwdfoldeditorwindow"
8
+ @rwd_tab = "superantcomfoldeditor"
9
+ end
10
+
@@ -0,0 +1,41 @@
1
+ # this method views the fold links
2
+ def fillziptoinstallnamex(inffile)
3
+ applet = inffile.strip
4
+ @a_viewfoldlink = applet
5
+
6
+ end
7
+
8
+
9
+ def rwddisplayfoldlinks
10
+ if @a_viewfoldlinkfile
11
+ if @a_viewfoldlinkfile.empty? # a fold link file has not been selected
12
+
13
+ fileName = File.join($rwdfoldeditor_directory,"default.fld")
14
+
15
+ else # you have picked the fold link file you want to use
16
+
17
+ fileName = File.join($rwdfoldeditor_directory, @a_viewfoldlinkfile.to_s.strip)
18
+ end
19
+ else
20
+ fileName = File.join($rwdfoldeditor_directory,"default.fld")
21
+ end
22
+ tmpfilearray = []
23
+ begin
24
+ File.open(fileName).each { |line|
25
+ if ! line.strip.empty?
26
+ tmpfilearray << line.strip
27
+ end
28
+ }
29
+ rescue
30
+ if $DEBUG
31
+ $stderr.puts "file error in dispfoldlinks"
32
+ end
33
+ end
34
+
35
+ @a_displayfoldlinks01 = tmpfilearray.entries.rwd_method("fillziptoinstallnamex")
36
+ @displayfoldlinkoptions = tmpfilearray.rwd_options
37
+
38
+
39
+
40
+ end
41
+
@@ -1,10 +1,10 @@
1
1
  # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
2
  # This application is a framework for writing programs from RubyWebDialogs
3
- # For information see http://www.rubyforge.net/projects/rwdapplications
3
+ # For information see http://www.rubyforge.net/projects/rwdapplications
4
4
 
5
5
  # return the version constant defined in the config file
6
- def rwdaddresseshelpaboutsetup
7
- return ["RwdAddresses", "(c) 2004 Steven Gibson ", "Version #{RwdAddressesVersion}"]
8
-
6
+ def rwdfoldeditorhelpaboutsetup
7
+ return ["RwdFoldEditor","(c) 2005-2008 Steven Gibson ","Version #{RwdFoldEditorVersion}"]
9
8
  end
10
9
 
10
+
@@ -0,0 +1,20 @@
1
+ # this method saves configuration record
2
+ def saverwdfoldeditorconfiguration
3
+ require 'fileutils'
4
+
5
+
6
+ newname = "rwdwfoldeditor.cnf" # grab the filename to create
7
+ newdata = @a_foldeditconfigurationfile
8
+
9
+
10
+ begin # exception trapped block
11
+ fileName = File.join( ConfigurationDir, newname )
12
+ fd = File.open(fileName,"w")
13
+ fd.print(newdata) # save the record info to the file
14
+ fd.close
15
+ @newconfigurationresult=newdata # show the record info in the browser
16
+ rescue SystemCallError, StandardError
17
+ $stderr.print "system call error: " + $!
18
+ end # exception rescue
19
+
20
+ end
@@ -0,0 +1,20 @@
1
+ # this method adds a new record
2
+ def savefoldlinkfile
3
+ require 'fileutils'
4
+ if ! @a_foldeditorlinkfile.empty? # the document is not empty
5
+ if ! @a_viewfoldlinkfile.empty? # the filename is not empty
6
+ fileName = File.join($rwdfoldeditor_directory,@a_viewfoldlinkfile.to_s) # grab the new filename to create
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ fd = File.open(fileName,"w")
12
+ fd.print( @a_foldeditorlinkfile) # save the record info to the file
13
+ fd.close
14
+
15
+ rescue SystemCallError, StandardError
16
+ $stderr.print "system call error: " + $!
17
+ end # exception rescue
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # this method adds a new record
2
+ def savefoldeditrecord
3
+ require 'fileutils'
4
+ if ! @folddocumentresult.empty? # the document is not empty
5
+ if ! @a_viewfoldlink.empty? # the filename is not empty
6
+ fileName = @a_viewfoldlink.to_s # grab the new filename to create
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ fd = File.open(fileName,"w")
12
+ fd.print( @folddocumentresult) # save the record info to the file
13
+ fd.close
14
+
15
+ rescue SystemCallError, StandardError
16
+ $stderr.print "system call error: " + $!
17
+ end # exception rescue
18
+ end
19
+ end
20
+ end