code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb in rwdgutenberg-0.03 vs code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb in rwdgutenberg-0.04

- old
+ new

@@ -1,21 +1,22 @@ - def viewappletcontents - require 'fileutils' - require 'extras/zip/zip' - nametext = "%s" % [@a_installapplet] - - begin # exception trapped block - fullname = nametext + ".zip" - fileName = File.join($zipslocation,fullname) - tempfilecontents = " " - zf = Zip::ZipFile.new(fileName) - zf.sort.each { - |entry| - tempfilecontents = tempfilecontents + entry.to_s + "\n" - } - @appletcontentstext = tempfilecontents - - rescue - @installapplettext = "unzip error - error opening applet" - end # exception rescue +#view contents of a tinker applet +def viewappletcontents + require 'fileutils' + require 'extras/zip/zip' + nametext = "%s" % [@a_installapplet] - end + begin # exception trapped block + fullname = nametext + ".zip" + fileName = File.join($zipslocation,fullname) + tempfilecontents = " " + zf = Zip::ZipFile.new(fileName) + zf.sort.each { + |entry| + tempfilecontents = tempfilecontents + entry.to_s + "\n" + } + @appletcontentstext = tempfilecontents + + rescue + @installapplettext = "unzip error - error opening applet" + end # exception rescue + +end