Just starting to play around with the VPIM gem, how do I add a location to an Icalendar event? I''ve looked over the basic example: cal = Vpim::Icalendar.create2 cal.add_event do |e| e.dtstart Date.new(2005, 04, 28) e.dtend Date.new(2005, 04, 29) e.summary "Monthly meet-the-CEO day" e.categories [ ''APPOINTMENT'' ] e.categories do |c| c.push ''EDUCATION'' end e.url ''http://www.example.com'' e.location "My House" #my addition to the example e.sequence 0 e.access_class "PRIVATE" e.transparency ''OPAQUE'' now = Time.now e.created now e.lastmod now e.organizer do |o| o.cn = "Example Organizer, Mr." o.uri = "mailto:organizer at example.com" end attendee = Vpim::Icalendar::Address.create("mailto:attendee at example.com") attendee.rsvp = true e.add_attendee attendee puts e.methods end I tried adding ''location'' below ''url''. What am I missing? Thanks in advance-- Jeff Wigal
I''m on vacation with no access to source for 3 more weeks, sorry. Looking at Icalendar::Maker or grepping source might help. Sam On Fri, Aug 29, 2008 at 11:09 PM, Jeff Wigal <jeff at wigaldesign.com> wrote:> Just starting to play around with the VPIM gem, how do I add a > location to an Icalendar event? > > I''ve looked over the basic example: > > cal = Vpim::Icalendar.create2 > cal.add_event do |e| > e.dtstart Date.new(2005, 04, 28) > e.dtend Date.new(2005, 04, 29) > e.summary "Monthly meet-the-CEO day" > e.categories [ ''APPOINTMENT'' ] > e.categories do |c| c.push ''EDUCATION'' end > e.url ''http://www.example.com'' > e.location "My House" #my addition to the example > e.sequence 0 > e.access_class "PRIVATE" > e.transparency ''OPAQUE'' > now = Time.now > e.created now > e.lastmod now > e.organizer do |o| > o.cn = "Example Organizer, Mr." > o.uri = "mailto:organizer at example.com" > end > attendee = Vpim::Icalendar::Address.create("mailto:attendee at example.com") > attendee.rsvp = true > e.add_attendee attendee > puts e.methods > end > > I tried adding ''location'' below ''url''. What am I missing? > > Thanks in advance-- > > Jeff Wigal > _______________________________________________ > Vpim-talk mailing list > Vpim-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/vpim-talk >
Just looking to see if anyone has any advice on this. Thanks! On Fri, Aug 29, 2008 at 12:09 PM, Jeff Wigal <jeff at wigaldesign.com> wrote:> Just starting to play around with the VPIM gem, how do I add a > location to an Icalendar event? > > I''ve looked over the basic example: > > cal = Vpim::Icalendar.create2 > cal.add_event do |e| > e.dtstart Date.new(2005, 04, 28) > e.dtend Date.new(2005, 04, 29) > e.summary "Monthly meet-the-CEO day" > e.categories [ ''APPOINTMENT'' ] > e.categories do |c| c.push ''EDUCATION'' end > e.url ''http://www.example.com'' > e.location "My House" #my addition to the example > e.sequence 0 > e.access_class "PRIVATE" > e.transparency ''OPAQUE'' > now = Time.now > e.created now > e.lastmod now > e.organizer do |o| > o.cn = "Example Organizer, Mr." > o.uri = "mailto:organizer at example.com" > end > attendee = Vpim::Icalendar::Address.create("mailto:attendee at example.com") > attendee.rsvp = true > e.add_attendee attendee > puts e.methods > end > > I tried adding ''location'' below ''url''. What am I missing? > > Thanks in advance-- > > Jeff Wigal >
On Wed, Oct 1, 2008 at 7:18 PM, Jeff Wigal <jeff at wigaldesign.com> wrote:> Just looking to see if anyone has any advice on this. Thanks!>> cal = Vpim::Icalendar.create2 >> cal.add_event do |e| >> e.dtstart Date.new(2005, 04, 28) >> e.dtend Date.new(2005, 04, 29) >> e.summary "Monthly meet-the-CEO day" >> e.categories [ ''APPOINTMENT'' ] >> e.categories do |c| c.push ''EDUCATION'' end >> e.url ''http://www.example.com'' >> e.location "My House" #my addition to the exampleThere is currently no API to set location. It would go in common.rb. I accept patches. However, it''s a TEXT property, so should be: e.set_text("LOCATION", "My House")>> I tried adding ''location'' below ''url''. What am I missing?This sounds like you might think that the properties are order dependant. Just FYI, they are not. Sam