rwdhypernote 0.03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. data/Notes/changes.lnk +1 -0
  2. data/Notes/changes.txt +1 -0
  3. data/Notes/hypernote/hypernote01.txt +1 -0
  4. data/Notes/hypernote/hypernote02.txt +1 -0
  5. data/Notes/hypernote/newnote3.txt +2 -0
  6. data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.lnk +1 -0
  7. data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.txt +11 -0
  8. data/Notes/rwdtinker/newnote.txt +1 -0
  9. data/Notes/rwdtinker/rwdtinker01.txt +9 -0
  10. data/Notes/rwdtinker/testnote2.txt +1 -0
  11. data/Readme.txt +97 -0
  12. data/bin/rwdhypernote +19 -0
  13. data/code/01rwdcore/01rwdcore.rb +20 -0
  14. data/code/01rwdcore/02helptexthashbegin.rb +4 -0
  15. data/code/01rwdcore/03helptexthash.rb +31 -0
  16. data/code/01rwdcore/04helptextend.rb +6 -0
  17. data/code/01rwdcore/openhelpwindow.rb +31 -0
  18. data/code/01rwdcore/returntomain.rb +10 -0
  19. data/code/01rwdcore/rwdtinkerversion.rb +15 -0
  20. data/code/01rwdcore/rwdwindowreturn.rb +11 -0
  21. data/code/superant.com.hypernote/archiveevent.rb +14 -0
  22. data/code/superant.com.hypernote/changehypernotename.rb +21 -0
  23. data/code/superant.com.hypernote/clearhypernotescreendisplay.rb +8 -0
  24. data/code/superant.com.hypernote/clearlinkscreendisplay.rb +8 -0
  25. data/code/superant.com.hypernote/copyfilename.rb +10 -0
  26. data/code/superant.com.hypernote/createnewnote.rb +14 -0
  27. data/code/superant.com.hypernote/deletehypernoterecord.rb +20 -0
  28. data/code/superant.com.hypernote/helptexthashrwdhypernote.rb +60 -0
  29. data/code/superant.com.hypernote/hyperlinkcreatelinkfile.rb +19 -0
  30. data/code/superant.com.hypernote/listhypernotelinks.rb +52 -0
  31. data/code/superant.com.hypernote/listhypernotes.rb +55 -0
  32. data/code/superant.com.hypernote/listlinknotes.rb +33 -0
  33. data/code/superant.com.hypernote/loadconfigurationrecord.rb +34 -0
  34. data/code/superant.com.hypernote/loadconfigurationvariables.rb +13 -0
  35. data/code/superant.com.hypernote/loadlinksrecord.rb +21 -0
  36. data/code/superant.com.hypernote/loadnoterecord.rb +24 -0
  37. data/code/superant.com.hypernote/openhelpwindowrwdhyernote.rb +23 -0
  38. data/code/superant.com.hypernote/returntomain.rb +10 -0
  39. data/code/superant.com.hypernote/rwdhypernotehelpabout.rb +14 -0
  40. data/code/superant.com.hypernote/saveconfigurationrecord.rb +18 -0
  41. data/code/superant.com.hypernote/savehypernoterecord.rb +20 -0
  42. data/code/superant.com.hypernote/savelinkrecord.rb +23 -0
  43. data/code/superant.com.hypernote/viewrwdschedulesconfiguration.rb +21 -0
  44. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +99 -0
  45. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +21 -0
  46. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +58 -0
  47. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +22 -0
  48. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -0
  49. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -0
  50. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  51. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
  52. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +11 -0
  53. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +31 -0
  54. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -0
  55. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +13 -0
  56. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  57. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -0
  58. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +42 -0
  59. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  60. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +28 -0
  61. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +12 -0
  62. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +14 -0
  63. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +18 -0
  64. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -0
  65. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
  66. data/code/zz0applicationend/zz0end.rb +4 -0
  67. data/configuration/language.cnf +5 -0
  68. data/configuration/rwdapplicationidentity.cnf +3 -0
  69. data/configuration/rwdhypernote.cnf +9 -0
  70. data/configuration/rwdhypernoteversion.cnf +3 -0
  71. data/configuration/rwdtinker.cnf +16 -0
  72. data/configuration/rwdtinkerversion.cnf +2 -0
  73. data/configuration/tinkerwin2variables.cnf +12 -0
  74. data/configuration/tinkerwin2version.cnf +3 -0
  75. data/ev/browser.rb +109 -0
  76. data/ev/ftools.rb +170 -0
  77. data/ev/net.rb +750 -0
  78. data/ev/ruby.rb +819 -0
  79. data/ev/rwd.rb +1849 -0
  80. data/ev/sgml.rb +236 -0
  81. data/ev/thread.rb +63 -0
  82. data/ev/tree.rb +343 -0
  83. data/ev/xml.rb +4 -0
  84. data/extras/zip/ioextras.rb +114 -0
  85. data/extras/zip/stdrubyext.rb +111 -0
  86. data/extras/zip/tempfile_bugfixed.rb +195 -0
  87. data/extras/zip/zip.rb +1376 -0
  88. data/extras/zip/zipfilesystem.rb +558 -0
  89. data/extras/zip/ziprequire.rb +61 -0
  90. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  91. data/gui/frontwindow0/superant.com.hypernote/10viewnote.rwd +32 -0
  92. data/gui/frontwindow0/superant.com.hypernote/20editlinks.rwd +34 -0
  93. data/gui/frontwindow0/superant.com.hypernote/30noteutilities.rwd +27 -0
  94. data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +16 -0
  95. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +12 -0
  96. data/gui/frontwindowselectionzend/viewselectionzend/viewselectionend.rwd +3 -0
  97. data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +6 -0
  98. data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +15 -0
  99. data/gui/frontwindowtdocuments/superant.com.rwdhypernotedocument/rwdhypernotedocument.rwd +5 -0
  100. data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +6 -0
  101. data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +12 -0
  102. data/gui/frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd +6 -0
  103. data/gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd +3 -0
  104. data/gui/helpaboutinstalled/superant.com.rwdhypernotehelpabout/1versionname.rwd +6 -0
  105. data/gui/helpaboutinstalled/superant.com.rwdhypernotehelpabout/5version.rwd +9 -0
  106. data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/1appname.rwd +4 -0
  107. data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/3copyright.rwd +3 -0
  108. data/gui/helpaboutinstalled/superant.com.rwdwin2helpabout/5version.rwd +10 -0
  109. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +4 -0
  110. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +3 -0
  111. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +10 -0
  112. data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +3 -0
  113. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  114. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +42 -0
  115. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  116. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  117. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +38 -0
  118. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +33 -0
  119. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -0
  120. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +11 -0
  121. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  122. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  123. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
  124. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
  125. data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +4 -0
  126. data/init.rb +269 -0
  127. data/lang/alanguagehashbegin.rb +4 -0
  128. data/lang/en/rwdcore/languagefile.rb +16 -0
  129. data/lang/es/rwdcore/languagefile-es.rb +14 -0
  130. data/lang/jp/rwdcore/languagefile.rb +9 -0
  131. data/lang/languagehash.rb +4 -0
  132. data/lang/nl/rwdcore/languagefile.rb +19 -0
  133. data/lang/templangfile.rb +16 -0
  134. data/lang/vlanguagehashend.rb +6 -0
  135. data/lang/wlocallangstart.rb +5 -0
  136. data/lang/xlocallangfile.rb +16 -0
  137. data/lang/zlocallangend.rb +2 -0
  138. data/lib/temp.rb +1 -0
  139. data/rwd_files/HowTo_HyperNote.txt +97 -0
  140. data/rwd_files/HowTo_Tinker.txt +375 -0
  141. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  142. data/rwd_files/Readme.txt +57 -0
  143. data/rwd_files/favicon.ico +0 -0
  144. data/rwd_files/rdoc-style.css +175 -0
  145. data/rwd_files/rwdapplications.html +54 -0
  146. data/rwd_files/rwdindex.html +6 -0
  147. data/rwd_files/tinker.png +0 -0
  148. data/zips/rwdahelloworld-0.5.zip +0 -0
  149. metadata +202 -0
@@ -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,52 @@
1
+ # this code is to list the links
2
+
3
+ def fillhypernotelinkname(inffile)
4
+
5
+ @a_viewlinksnote = inffile
6
+ end
7
+
8
+ def findnotelinkfiles(d)
9
+ a = Array.new(Dir[d].entries.sort)
10
+ #loop through and get the files names
11
+ a.each do |x|
12
+ #adjust the filters to the files you want to see...
13
+ if(!test(?d,x))
14
+ # only lnk files
15
+ if x =~ /rb|lnk|lnk/
16
+ puts "#{x}" #opens the file thats in fileName as read only
17
+ $noteslinksarray = $noteslinksarray | ["#{x}"]
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ def rwdhypernotelistlinkdirs
24
+ $noteslinksarray = [""]
25
+ startlangdir = $rwdhypernote_directory
26
+ #get a list of the files and subdirectories on the starting directory only
27
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
28
+ #loop through the list, ignore the files and add all new directories found
29
+ alanghash.each do |x|
30
+ #if a directory...
31
+ if(test(?d,x))
32
+ # add to the original list of directories
33
+ @@tmproot = x + "/**"
34
+ #adds the new ones to the array
35
+ blanghash = Dir[@@tmproot].entries.sort
36
+ blanghash.each do |x|
37
+ if(test(?d,x))
38
+ alanghash.push(x) #appends to the end of the array...
39
+ end
40
+ end
41
+ end
42
+ end
43
+ alanghash.each do |x|
44
+ #if it is a file...
45
+ if(!test(?d,x))
46
+ alanghash.delete(x)
47
+ else #it is a directory...
48
+ findnotelinkfiles(x + "/**")
49
+ end
50
+ end
51
+ @notelinksrecordsresult = $noteslinksarray.rwd_method("fillhypernotelinkname")
52
+ end
@@ -0,0 +1,55 @@
1
+ # this code is to list the notes
2
+
3
+
4
+
5
+ def fillhypernotename(inffile)
6
+ applet = inffile.gsub(/\.txt$/, "")
7
+ @a_viewhypernote = applet
8
+
9
+ end
10
+
11
+ def findnotefiles(d)
12
+ a = Array.new(Dir[d].entries.sort)
13
+ #loop through and get the files names
14
+ a.each do |x|
15
+ #adjust the filters to the files you want to see...
16
+ if(!test(?d,x))
17
+ # only txt files
18
+ if x =~ /rb|txt|txt/
19
+ puts "#{x}" #opens the file thats in fileName as read only
20
+ $notesarray = $notesarray | ["#{x}"]
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ def listnotedirs
27
+ startlangdir = $rwdhypernote_directory
28
+ $notesarray = [""]
29
+ #get a list of the files and subdirectories on the starting directory only
30
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
31
+ #loop through the list, ignore the files and add all new directories found
32
+ alanghash.each do |x|
33
+ #if a directory...
34
+ if(test(?d,x))
35
+ # add to the original list of directories
36
+ @@tmproot = x + "/**"
37
+ #adds the new ones to the array
38
+ blanghash = Dir[@@tmproot].entries.sort
39
+ blanghash.each do |x|
40
+ if(test(?d,x))
41
+ alanghash.push(x) #appends to the end of the array...
42
+ end
43
+ end
44
+ end
45
+ end
46
+ alanghash.each do |x|
47
+ #if it is a file...
48
+ if(!test(?d,x))
49
+ alanghash.delete(x)
50
+ else #it is a directory...
51
+ findnotefiles(x + "/**")
52
+ end
53
+ end
54
+ @noterecordsresult = $notesarray.entries.sort.rwd_method("fillhypernotename")
55
+ end
@@ -0,0 +1,33 @@
1
+ # this code is to list the internal links
2
+
3
+
4
+ def fillhypernotelinksname(inffile)
5
+ applet = inffile.gsub(/\.txt$/, "")
6
+ @a_viewhypernote = applet
7
+
8
+ end
9
+
10
+
11
+
12
+ def listlocalnotelinks
13
+ filenamestoopenarray = [" "]
14
+ if @a_viewhypernote
15
+ begin
16
+ fileName =@a_viewhypernote + ".lnk"
17
+
18
+ fd = File.open(fileName,"r")
19
+ while ! fd.eof?
20
+ templinkline = fd.readline.chomp
21
+ filenamestoopenarray = filenamestoopenarray | ["#{templinkline}"]
22
+ end
23
+ fd.close
24
+ @noterecordsresult = " "
25
+ @localnotelinksrecordsresult = filenamestoopenarray .rwd_method("fillhypernotelinksname")
26
+ rescue
27
+ @localnotelinksrecordsresult = "error opening #{fileName} file"
28
+ end # end of error function
29
+
30
+ end
31
+ end
32
+
33
+
@@ -0,0 +1,34 @@
1
+ # this method puts the configuration rexord on the screen
2
+ def loadrwdscheduleconfiguration
3
+
4
+ require 'fileutils'
5
+
6
+ @a_schconfigurationfilename = "rwdschedule.cnf"
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ Dir.chdir($progdir)
12
+ fileName = File.join(ConfigurationDir, "rwdschedule.cnf")
13
+
14
+
15
+ fd = File.open(fileName,"r")
16
+ @a_schconfigline1= fd.readline.chomp
17
+ @a_schconfigline2 = fd.readline.chomp
18
+ @a_schconfigline3 = fd.readline.chomp
19
+ @a_schconfigline4 = fd.readline.chomp
20
+ @a_schconfigline5 = fd.readline.chomp
21
+ @a_schconfigline6 = fd.readline.chomp
22
+ @a_schconfigline7 =fd.readline.chomp
23
+ @a_schconfigline8 = fd.readline.chomp
24
+ @a_schconfigline9 = fd.readline.chomp
25
+
26
+ while ! fd.eof?
27
+ @extraschconfigdatadisplay = fd.readline
28
+ end
29
+ fd.close
30
+ rescue SystemCallError, StandardError
31
+ $stderr.print "system call error: " + $!
32
+ end # exception rescue
33
+
34
+ end
@@ -0,0 +1,13 @@
1
+ # this method loads the on screen variables into the running class
2
+ def loadrwdscheduleconfigurationvariables
3
+
4
+ configfiletoload = File.join(ConfigurationDir,"rwdschedule.cnf")
5
+ begin
6
+ load configfiletoload
7
+ @extraschconfigdatadisplay = ""
8
+ @newschconfigurationresult = "Config Variables loaded"
9
+ rescue
10
+ @extraschconfigdatadisplay = ""
11
+ @newschconfigurationresult = "loading error"
12
+ end
13
+ end
@@ -0,0 +1,21 @@
1
+ # this method views an existing record
2
+ def rwdhypernotesloadlinksrecord
3
+
4
+ require 'fileutils'
5
+
6
+
7
+ begin # exception trapped block
8
+
9
+
10
+ fileName = @a_viewlinksnote
11
+
12
+ fd = File.open(fileName,"r")
13
+ @a_notelinksdata = fd.read
14
+
15
+
16
+ fd.close
17
+ rescue SystemCallError, StandardError
18
+ $stderr.print "system call error: " + $!
19
+ end # exception rescue
20
+
21
+ end
@@ -0,0 +1,24 @@
1
+ # this method views an existing address record
2
+ def loadnoterecord
3
+
4
+ require 'fileutils'
5
+ @a_eventfilename = $currenteventtext
6
+
7
+ begin # exception trapped block
8
+
9
+
10
+ fileName = @a_viewhypernote + ".txt"
11
+
12
+ fd = File.open(fileName,"r")
13
+ @a_notedata = fd.read
14
+
15
+
16
+
17
+
18
+
19
+ fd.close
20
+ rescue SystemCallError, StandardError
21
+ $stderr.print "system call error: " + $!
22
+ end # exception rescue
23
+
24
+ end
@@ -0,0 +1,23 @@
1
+ # this code is to call the help window
2
+ def runhelpwindowrwdhypernote
3
+
4
+ $help_topic = "rwdhypernote_generalhelp"
5
+ if @rwd_tab == "superantcomeditnoterecordfile"
6
+ $help_topic = "rwdhypernote_generalhelp"
7
+ end
8
 
9
+ if @rwd_tab == "rwdhypernoteeditlinksrecordfile"
10
+ $help_topic = "hypernotelinks_help"
11
+ end
12
+
13
+ $helptopicsarray = $helptopicsarray | ["rwdhypernote_help","hypernotelinks_help"]
14
+
15
+
16
+
17
+ if @rwd_window != "rwdtinkerhelpwindow"
18
+ $previouswindow = @rwd_window
19
+ $previoustab = @rwd_tab
20
+ end
21
+ runhelpwindow
22
+ end
23
+
24
+
@@ -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 returntomainx
7
+ @rwd_window = "main"
8
+ @rwd_tab = "rwdscheduleselectiontab"
9
+ end
10
+
@@ -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 runrwdhypernoteversion
8
+ @rwd_window = "applicationversion"
9
+ @versionappnamedisplay = "RwdHyperNote"
10
+ @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
11
+ @versionnumberdisplay = "Version " + RwdHyperNoteVersion
12
+
13
+ end
14
+
@@ -0,0 +1,18 @@
1
+ # this method adds a new address record
2
+ def saverwdXconfiguration
3
+ require 'fileutils'
4
+
5
+ newname = "rwdschedule.cnf" # grab the filename to create
6
+ newdata =@a_schconfigline1.to_s + "\n" + @a_schconfigline2.to_s + "\n" + @a_schconfigline3.to_s + "\n" + @a_schconfigline4.to_s + "\n" + @a_schconfigline5.to_s + "\n" + @a_schconfigline6.to_s + "\n" + @a_schconfigline7.to_s + "\n" + @a_schconfigline8.to_s + "\n" + @a_schconfigline9.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
+
18
+ end
@@ -0,0 +1,20 @@
1
+ # this method adds a new record
2
+ def savehypernoterecord
3
+ require 'fileutils'
4
+ if ! @a_notedata.empty?
5
+ if ! @a_viewhypernote.empty?
6
+ fileName = @a_viewhypernote.to_s + ".txt" # grab the new filename to create
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ fd = File.open(fileName,"w")
12
+ fd.print( @a_notedata) # 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,23 @@
1
+ # this method adds a new record
2
+ def hypernotesavelinkrecord
3
+ require 'fileutils'
4
+ if ! @a_notelinksdata.empty?
5
+ if ! @a_viewlinksnote.empty?
6
+ fileName = "%s" % [@a_viewlinksnote] # grab the new filename to create
7
+
8
+
9
+ begin # exception trapped block
10
+
11
+ fd = File.open(fileName,"w")
12
+ fd.print( @a_notelinksdata) # save the record info to the file
13
+ fd.close
14
+
15
+ p fileName
16
+ p @a_notelinksdata
17
+
18
+ rescue SystemCallError, StandardError
19
+ $stderr.print "system call error: " + $!
20
+ end # exception rescue
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,21 @@
1
+ def viewrwdschedulesconfiguration
2
+ require 'fileutils'
3
+ begin # exception trapped block
4
+
5
+ Dir.chdir($progdir)
6
+ rwdschedulesconfigurationfile = File.join( "configuration", "rwdschedule.cnf" )
7
+ if File.exist?(rwdschedulesconfigurationfile)
8
+ fd = File.open(rwdschedulesconfigurationfile,"r")
9
+ @rwdschedulesconfigurationtext = " "
10
+ while ! fd.eof?
11
+ @rwdschedulesconfigurationtext = fd.read
12
+ end
13
+ fd.close
14
+ else
15
+ @rwdschedulesconfigurationtext = "File error"
16
+ end
17
+ rescue SystemCallError, StandardError
18
+ $stderr.print "system call error: " + $!
19
+ @rwdschedulesconfigurationtext = "File error"
20
+ end # exception rescue
21
+ end
@@ -0,0 +1,99 @@
1
+ # Bind message passing socket to rwdtinker application
2
+
3
+ def runcontrolcommand
4
+ require 'socket'
5
+
6
+ # Change this line...
7
+ ip = '127.0.0.1'
8
+ # And this one...
9
+ port = $rwdcontrolport1
10
+ if @a_remoteportinput
11
+ port = @a_remoteportinput.to_i
12
+ end
13
+
14
+ commandtext = @a_remotecommandinput.to_s
15
+ remotehostnotfound = true
16
+ if (commandtext == "stop")
17
+ begin
18
+ client = UDPSocket::new()
19
+ client.send(commandtext, 0, ip, port)
20
+ @socket = UDPSocket::new()
21
+ @socket.bind(ip, port)
22
+ # Rescue the "Address in use" error
23
+ rescue Errno::EADDRINUSE
24
+
25
+ databack, info = client.recv(128)
26
+ @remotecommandresult = databack
27
+ @lastremotecommand = "rwdtinker remote:: Port #{port} on host #{ip} ."
28
+ remotehostnotfound = false
29
+
30
+ # Rescue the "Address not available" error
31
+ rescue Errno::EADDRNOTAVAIL
32
+ puts "Network plugin: Address #{host} is not available to bind."
33
+
34
+ # Rescue "permission denied errors
35
+ rescue Errno::EACCES
36
+ puts "Network plugin: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
37
+
38
+ # Rescue all other errors
39
+ rescue
40
+ puts "Network plugin: An error occured."
41
+
42
+ # Rescue all other errors
43
+ end
44
+ if remotehostnotfound
45
+ @remotecommandresult = "Remote Host not running"
46
+ end
47
+ @socket.close
48
+ # Close the socket after use
49
+ client.close()
50
+ end
51
+
52
+ remotehostnotfound = true
53
+ if (commandtext == "query")
54
+ begin
55
+ client = UDPSocket::new()
56
+ client.send(commandtext, 0, ip, port)
57
+ @socket = UDPSocket::new()
58
+ @socket.bind(ip, port)
59
+ # Rescue the "Address in use" error
60
+ rescue Errno::EADDRINUSE
61
+
62
+ databack, info = client.recv(128)
63
+ @remotecommandresult = databack
64
+ @lastremotecommand = "rwdtinker remote: Port #{port} on host #{ip} "
65
+ remotehostnotfound = false
66
+
67
+ # Rescue the "Address not available' error
68
+ rescue Errno::EADDRNOTAVAIL
69
+ puts "Network plugin: Address #{host} is not available to bind."
70
+
71
+ # Rescue "permission denied errors
72
+ rescue Errno::EACCES
73
+ puts "Network plugin: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
74
+
75
+ # Rescue all other errors
76
+ rescue
77
+ puts "Network plugin: An error occured."
78
+
79
+ # Rescue all other errors
80
+ end
81
+ @socket.close
82
+
83
+ # Close the socket after use
84
+ client.close()
85
+ end
86
+
87
+ if remotehostnotfound
88
+ @remotecommandresult = "Remote Host not running"
89
+ end
90
+ end
91
+
92
+ # list the remote control options on the screen
93
+ def showremoteportoptions
94
+
95
+ @remoteportoptions = $rwdcontrolports.rwd_options
96
+ @remotecommandoptions = ["query","stop"].rwd_options
97
+ end
98
+
99
+