Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

VAlarm not found in VEvent

Help
Pulce
2013-12-05
2013-12-08
  • Pulce
    Pulce
    2013-12-05

    Hi there,

    I already feel somewhat familiar with ical4j, but I constantly fail to get hands on a VAlarm in VEvents that come from parsing a (thunderbird-created) .ics file. I have the VEvent objects working (all components are fine), but when i try

    VEvent vev = new VEvent(component.getProperties());
    int count = vev.getAlarms().size()

    count is zero for all events. Am I missing something?
    Thanks for any help!

     
  • Pulce
    Pulce
    2013-12-08

    OK, I see the issue now (stupid on my side, but maybe someone else runs into the same issue). Obviously the VAlarm is not part of the VEvent's property list. Thus, the VEvent only covers the VAlarm if I instantiate it by casting the component:

    VEvent vev = (VEvent) component;