code/superant.com.schedule/loadeventrecord.rb in rwdschedule-0.94 vs code/superant.com.schedule/loadeventrecord.rb in rwdschedule-0.95
- old
+ new
@@ -1,6 +1,6 @@
- # this method views an existing address record
+ # this method views an existing record
def loadeventrecord
require 'fileutils'
@a_eventfilename = $currenteventtext
@@ -8,17 +8,25 @@
fileName = $rwdschedule_directory + "/" + $currenteventtext + ".sch"
fd = File.open(fileName,"r")
- @a_eventtime = fd.readline.chomp
- @a_eventwhat = fd.readline.chomp
- @a_eventaddress = fd.readline.chomp
- @a_eventphone = fd.readline.chomp
- @a_eventemail = fd.readline.chomp
- @a_eventcomment1 = fd.readline.chomp
- @a_eventcomment2 =fd.readline.chomp
- @a_eventcomment3 = fd.readline.chomp
+ 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