# this method views an existing record def loadeventrecord require 'fileutils' @a_eventfilename = $currenteventtext begin # exception trapped block fileName = $rwdschedule_directory + "/" + $currenteventtext + ".sch" fd = File.open(fileName,"r") eventdatetime = fd.readline.chomp @a_eventyear = eventdatetime.slice(0..3) @a_eventmonth = eventdatetime.slice(4..5) @a_eventday = eventdatetime.slice(6..7) @a_eventbeginhour = eventdatetime.slice(9..10) @a_eventbeginminute = eventdatetime.slice(11..12) eventdatetime2 = fd.readline.chomp @a_eventendhour = eventdatetime2.slice(9..10) @a_eventendminute = eventdatetime.slice(11..12) @a_eventsummary = fd.readline.chomp @a_eventdescription = fd.readline.chomp @a_eventlocation = fd.readline.chomp while ! fd.eof? @extraeventdatadisplay = fd.readline end fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end