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,21 @@
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
+
21
+
@@ -0,0 +1,58 @@
1
+ # help text files used by context sensitive help
2
+
3
+ Helptext.update( :tinkerwin2_help => " You can view the list of applets you can install
4
+ by clicking on the list files button
5
+
6
+ You can download an applet created by someone else
7
+
8
+ put the file in the zips directory
9
+
10
+ rwdtinker applets packaged as RubyGems can be used if you have RubyGems installed.
11
+ You can download rwdtinker gems at the 'Install Remote Applets' tab
12
+ ",
13
+ :applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
14
+ To see the text of a install file
15
+ Type in the name of the file you want.
16
+
17
+ type it without the inf ending
18
+ rwdapplet-0.1
19
+
20
+ Then click the 'View Installed File' button
21
+
22
+ If it finds the file it will open it. It displays the text the search box.
23
+
24
+ You can uninstall applets on this screen",
25
+
26
+ :applet_installation => " You can download an applet created by someone else\n
27
+ put the file in the zips directory\n
28
+
29
+ click on the 'list zips' tab\n
30
+ click on 'list applets available for installing'\n
31
+
32
+ chose the applet you want\n
33
+ click on 'install applet'\n
34
+ If all goes well the applet should be installed.\n
35
+ You will need to restart rwdtinker to see the new screens",
36
+ :applet_tinkerbackeditconfiguration => " You can edit the configuration
37
+
38
+ Remember to reload the configuration variables if you want your
39
+ changes used.",
40
+ :remotegemapplet_install => " To download and install use the 'Install Remote Applets'
41
+
42
+ First click on 'List applets in the Remote GEM Repository available for downloading'
43
+ then go to the very bottom to click on the applet you want
44
+ then on the top click 'install remote Gem applet package'
45
+
46
+ This installs the package in the Gem system
47
+ You still need to install it into rwdtinker - do that in the 'List Zips' tab
48
+
49
+ For this feature to work, you need
50
+ RubyGems installed
51
+ Variables set correctly in the tinerwin2.cnf file
52
+ $xpcommand, $gemdirectory_withgemfiles and $geminstalled_directory
53
+ the defaults as shipped will normally be for a Debian Linux system
54
+ On Debian Linux, you would usually need to be running rwdtinker as root in order to install RubyGems
55
+
56
+ You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
57
+ "
58
+ )
@@ -0,0 +1,22 @@
1
+ # code in install rwdtinker applets - now uses ruby.zip module
2
+ def installapplet
3
+ require 'fileutils'
4
+ require 'extras/zip/zip'
5
+ nametext = "%s" % [@a_installapplet]
6
+
7
+ begin # exception trapped block
8
+ fullname = nametext + ".zip"
9
+ fileName = File.join($zipslocation,fullname)
10
+
11
+ zf = Zip::ZipFile.new(fileName)
12
+ zf.sort.each {
13
+ |entry|
14
+ zf.extract(entry.to_s, entry.to_s)
15
+ }
16
+ @installapplettext = Message[:applet_installed]
17
+
18
+ rescue
19
+ @installapplettext = "unzip error - applet may not be installed correctly"
20
+ end # exception rescue
21
+
22
+ end
@@ -0,0 +1,20 @@
1
+ # install rwdtinker applet from a long directory location
2
+ def installgemapplet
3
+ require 'fileutils'
4
+ require 'extras/zip/zip'
5
+ nametext = "%s" % [@a_installapplet]
6
+
7
+ begin # exception trapped block
8
+ fullname = nametext + ".zip"
9
+
10
+ zf = Zip::ZipFile.new(fullname)
11
+ zf.sort.each {
12
+ |entry|
13
+ zf.extract(entry.to_s, entry.to_s)
14
+ }
15
+ @installapplettext = Message[:applet_installed]
16
+
17
+ rescue
18
+ @installapplettext = "unzip error - applet may not be installed correctly"
19
+ end # exception rescue
20
+ end
@@ -0,0 +1,19 @@
1
+ # download gem of rwdtinker applet
2
+ def superantcominstallremotegemapplet
3
+ require 'fileutils'
4
+
5
+ tempnametext = "%s" % [@superantcominstallremoteappletinput]
6
+ temparray = tempnametext.split(/ /)
7
+ nametext = temparray[0]
8
+ begin # exception trapped block
9
+
10
+
11
+ commandline = $xpcommand + "gem install " + nametext
12
+
13
+ @superantcominstallremotegemappletresult = `#{commandline}`
14
+
15
+ rescue
16
+ @superantcominstallremotegemappletresult = "error during gem install!"
17
+ end # exception rescue
18
+
19
+ end
@@ -0,0 +1,12 @@
1
+ # this code is to list the gem directories that are installed
2
+ def superantcomshowgemfiledirs
3
+
4
+ fileList = Dir.new($gemdirectory_withgemfiles).entries.sort.delete_if { |x| ! (x =~ /\Arwdzip/) }
5
+ @superantcomshowgemappletdirsresult = fileList.rwd_method("superantcomshowgemappletdirsname")
6
+ end
7
+
8
+ def superantcomshowgemappletdirsname(inffile)
9
+ applet = inffile
10
+ @a_gemfiledirsinput = applet
11
+
12
+ end
@@ -0,0 +1,54 @@
1
+ # this code is to list the zips
2
+
3
+
4
+ def fillzipappletname(inffile)
5
+ applet = inffile.gsub(/\.zip$/, "")
6
+ @a_installapplet = applet
7
+
8
+ end
9
+
10
+ def findzipfiles(d)
11
+ a = Array.new(Dir[d].entries.sort)
12
+ #loop through and get the files names
13
+ a.each do |x|
14
+ #adjust the filters to the files you want to see...
15
+ if(!test(?d,x))
16
+ # only zip files
17
+ if x =~ /\.zip/
18
+ puts "#{x}" #opens the file thats in fileName as read only
19
+ $zipsarray = $zipsarray | ["#{x}"]
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ def listgemzips
26
+ startlangdir = $geminstalled_directory
27
+ #get a list of the files and subdirectories on the starting directory only
28
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
29
+ p alanghash
30
+ #loop through the list, ignore the files and add all new directories found
31
+ alanghash.each do |x|
32
+ #if a directory...
33
+ if(test(?d,x))
34
+ # add to the original list of directories
35
+ @@tmproot = x + "/**"
36
+ #adds the new ones to the array
37
+ blanghash = Dir[@@tmproot].entries.sort
38
+ blanghash.each do |x|
39
+ if(test(?d,x))
40
+ alanghash.push(x) #appends to the end of the array...
41
+ end
42
+ end
43
+ end
44
+ end
45
+ alanghash.each do |x|
46
+ #if it is a file...
47
+ if(!test(?d,x))
48
+ alanghash.delete(x)
49
+ else #it is a directory...
50
+ findzipfiles(x + "/**")
51
+ end
52
+ end
53
+ @zipslistresult = $zipsarray.rwd_method("fillzipappletname")
54
+ end
@@ -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,31 @@
1
+ # this code is to list the zipped applets that can be installed
2
+
3
+
4
+ def fillziptoinstallname(inffile)
5
+ applet = inffile.gsub(/\.zip$/, "")
6
+ @a_installapplet = applet
7
+
8
+ end
9
+
10
+
11
+
12
+
13
+ def listzipfilestoinstall
14
+ startlangdir = File.join($progdir, $zipslocation )
15
+ #get a list of the files and subdirectories on the starting directory only
16
+
17
+
18
+ a = Array.new(Dir["#{startlangdir}/*"].entries.sort)
19
+
20
+ #loop through and get the files names
21
+ a.each do |x|
22
+ # only zip files
23
+ if x =~ /\.zip/
24
+ # puts "#{x}" #adds the file to the array to display on the screen
25
+ $zipsarraylocal = $zipsarraylocal | ["#{x}"]
26
+ end
27
+
28
+ end
29
+
30
+ @zipslistresult = $zipsarraylocal.rwd_method("fillziptoinstallname")
31
+ end
@@ -0,0 +1,32 @@
1
+ # this method puts the configuration rexord on the screen
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 loads the on screen variables into the running class
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
@@ -0,0 +1,87 @@
1
+ #!ruby
2
+ require 'socket' # Network stuff
3
+ require 'timeout' # Timeout functions
4
+
5
+ def network_start
6
+ if RUBY_PLATFORM != "i386-mswin32"
7
+ processone = fork {
8
+ network_demon }
9
+ Process.detach(processone)
10
+
11
+ else
12
+ puts "fork not tried winXP?"
13
+ end
14
+ @viewremotecommandresult = "starting controller on next available port"
15
+ end
16
+
17
+ def network_demon
18
+ # Find configuration variables
19
+ host = "127.0.0.1"
20
+ port = $rwdcontrolports[0].to_i
21
+
22
+ openportfound = false
23
+ until openportfound
24
+
25
+ # Create a socket to listen on and bind it to the host and port
26
+ begin
27
+ @socket = UDPSocket::new()
28
+ @socket.bind(host, port)
29
+ # Rescue the "Address in use" error
30
+ openportfound = true
31
+
32
+ rescue Errno::EADDRINUSE
33
+ puts "controller startup: Port #{port} on host #{host} is already in use."
34
+ port=port+1
35
+ # Rescue the "Address not available' error
36
+ rescue Errno::EADDRNOTAVAIL
37
+ puts "Network plugin: Address #{host} is not available to bind."
38
+ port=port+1
39
+ # Rescue "permission denied errors
40
+ rescue Errno::EACCES
41
+ puts "controller startup: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
42
+ port=port+1
43
+ # Rescue all other errors
44
+ rescue
45
+ puts "Network plugin: An error occured."
46
+ port = port+1
47
+ # Rescue all other errors
48
+ end
49
+
50
+ end
51
+
52
+
53
+ # Get all acceptable hosts
54
+ hosts = ["localhost","vaio-sag"]
55
+ # Do some nice errorchecking
56
+ if(hosts.type != Array)
57
+ puts "Network plugin: No hosts found in networkConfig/acceptHosts. Shutting down plugin."
58
+ return -1 # Return the errorcode for plugin failure
59
+ end
60
+
61
+ # Main loop
62
+ while(true)
63
+ # Get data and client data from the client
64
+ data, info = @socket.recvfrom(256)
65
+
66
+ # Is this an acceptable IP address?
67
+ if(hosts.include?(info[2]) || hosts.include?(info[3]))
68
+ command, parameter = data.split(';')
69
+
70
+ # Command actions
71
+ command.downcase!()
72
+ case command
73
+
74
+ when 'stop'
75
+ @socket.send("hello world",0,info[3],info[1].to_i)
76
+
77
+ when 'query'
78
+ @socket.send("#{$rwdapplicationidentity} on port #{$port}",0,info[3],info[1].to_i)
79
+
80
+
81
+ end # case command
82
+
83
+ end # Access control if
84
+ end # while(true)
85
+
86
+ end # Network::start()
87
+
@@ -0,0 +1,18 @@
1
+ def openappletname
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,42 @@
1
+ # this code is to call the help window
2
+ def runhelpwindowtinkerwin2
3
+
4
+ # $helptopicsarray = $helptopicsarray | [""]
5
+
6
+ $help_topic = "tinkerwin2_help"
7
+ if @rwd_tab == "rwdzipslister"
8
+ $help_topic = "tinkerwin2_help"
9
+ end
10
+
11
+ if @rwd_tab == "filelister"
12
+ $help_topic = "applet_viewing"
13
+
14
+ end
15
+ if @rwd_tab == "zipslister"
16
+ $help_topic = "applet_installation"
17
+
18
+ end
19
+ if @rwd_tab == "editconfigurationfile"
20
+ $help_topic = "applet_tinkerbackeditconfiguration"
21
+
22
+ end
23
+ if @rwd_tab == "rwdremotecontrol"
24
+ $help_topic = "remote_control"
25
+
26
+ end
27
+ if @rwd_tab == "superantcomremotezipsinstall"
28
+ $help_topic = "remotegemapplet_install"
29
+ end
30
+
31
+
32
+ if @rwd_window != "rwdtinkerhelpwindow"
33
+ $previouswindow = @rwd_window
34
+ $previoustab = @rwd_tab
35
+ else
36
+ $previouswindow = @rwd_window
37
+ $previoustab = @rwd_tab
38
+ end
39
+ runhelpwindow
40
+ end
41
+
42
+