I have a new question about attendees list : I would like to remove all attendees of an iCal and add my own attendee.
Here is what I succeded to do :
event.removeProperties(Attendee.class);
event.addAttendee("titi@tutu.fr");
Is there another way ?
Thanks ! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could also do "event.getAttendees().clear()". Do you think I should add "remove" methods for all the properties too? Like: "event.removeAttendees()"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hm, I first tried "event.getAttendees().clear()" but it didn't work, so that I looked for another way...
I confess I have not tried to look into the code to understand why, but looking quickly this morning I think we lose pointer on the effective List in method :
public <t extends="" icalproperty=""> List<t> getProperties(Class<t> clazz)</t></t></t>
I think it's good idea to remove properties, because sometimes we have to parse an iCalendar, change just some things, and write the new iCalendar..
I'm sorry to give you always more work ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, I forgot about that, you are right. However, you should be able to use the "removeProperties()" method to remove properties. Is there any reason why you prefer not to? :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes I can use this method, and that's what I do :)
It's not a problem because I want to remove ALL attendees in my iCal, but if I wanted to remove only one of them, I think I can't ?
But you're right, at the moment, I have no need of that.. just an idea for a possible improvement ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know. Both techniques require about the same amount of code. If a "remove" method existed, you would first have to find the property that you want to remove before removing it. Still, having a "remove" method for each property would make things more consistent.
Hello,
I have a new question about attendees list : I would like to remove all attendees of an iCal and add my own attendee.
Here is what I succeded to do :
event.removeProperties(Attendee.class);
event.addAttendee("titi@tutu.fr");
Is there another way ?
Thanks ! :)
You could also do "event.getAttendees().clear()". Do you think I should add "remove" methods for all the properties too? Like: "event.removeAttendees()"
Hm, I first tried "event.getAttendees().clear()" but it didn't work, so that I looked for another way...
I confess I have not tried to look into the code to understand why, but looking quickly this morning I think we lose pointer on the effective List in method :
public <t extends="" icalproperty=""> List<t> getProperties(Class<t> clazz)</t></t></t>
I think it's good idea to remove properties, because sometimes we have to parse an iCalendar, change just some things, and write the new iCalendar..
I'm sorry to give you always more work ;)
Ah, I forgot about that, you are right. However, you should be able to use the "removeProperties()" method to remove properties. Is there any reason why you prefer not to? :)
Yes I can use this method, and that's what I do :)
It's not a problem because I want to remove ALL attendees in my iCal, but if I wanted to remove only one of them, I think I can't ?
But you're right, at the moment, I have no need of that.. just an idea for a possible improvement ;)
I don't know. Both techniques require about the same amount of code. If a "remove" method existed, you would first have to find the property that you want to remove before removing it. Still, having a "remove" method for each property would make things more consistent.