Sha256: 64b3cf234822bc7deb719c740d60eb1eb8b731f9e9b4ca1cebe27d95a1a940f9

Contents?: true

Size: 1.44 KB

Versions: 2

Compression:

Stored size: 1.44 KB

Contents

# method to open new gutenberg window
 def rungutenbergwindow
    
     rwdgutenbergwindowtwo
  end

  $tempnumber  = 0
 # display text and advance text
  def rwdgutenbergwindowtwo
  tempdoc = ""
  @gutendisplayvariable = ""
  tempcount = 0
  if @rwd_tab== "rwdgutenberg"
    @rwd_window	= "gutendisplaywindowtwo"
    end
    
    if $gutenbergcommand == "openbook"
          tmpfileName =  @a_viewgutenberg + ".gut"
      fileName = File.join($rwdgutenberg_directory,tmpfileName)
    begin
	    fd = File.open(fileName,"r")
	    booktitle =        fd.readline.chomp
      $bookfile=File.new(booktitle,"r")        #opens the file thats in fileName as read only
      
      rescue
     
     $stderr.print "error: #{$!}"
    end  
       $gutenbergcommand == "continue" 
    end  
    
 
   if $gutenbergcommand == "continue"
 
  
       tempcount = 0
      while   tempcount <  $booksteps 
       tempdoc += $bookfile.gets    #reads the file into the doc string
       tempcount += 1
      end
       $booklocation = $booklocation + $booksteps
      end
   if  $gutenbergcommand == "openbook"

     while   tempcount < $booklocation + $booksteps 
       tempdoc += $bookfile.gets    #reads the file into the doc string
       
       tempcount += 1
     end
     $booklocation = $booksteps
     $gutenbergcommand = "continue"
    end
   if $gutenbergcommand == "closebook"      
          $bookfile.close   
    end       
       @gutendisplayvariable = tempdoc
  end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bigtinker-0.93 code/superant.com.gutenberg/rungutenbergwindow.rb
bigtinker-0.94 code/superant.com.gutenberg/rungutenbergwindow.rb