-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event.Copy should do a deep copy #149
Comments
Yep, sounds like a bug. I may have introduced it when I was evaluating all the usages of |
Hi @rianjs , could you please explain why this bug was closed? I tried to do an event copy (want to create an Exception from a recurrent event), but this is not actual copy, because changing the event field (e.g. Summary) also changes the parent fields value as well.
I have no other possibility to create copy of new event except serialize/deserialize, but it is poor performance. |
It isn’t closed. |
Sorry for misunderstanding, very latest "Duplicate property DESCRIPTION" at the end of the list has confused me a bit. :) So, do you have any plans and estimations for fixing this issue? Or maybe you can propose another workaround except mentioned above serialize/deserialize approach? Thank you in advance. |
No.
That's what we do today, hundreds of |
If I do
var tmpEvent = permanentEvent.Copy();
var newStart = new CalDateTime(blabla);
tmpEvent.Start = newStart;
then permanentEvent.Start has also changed to newStart. Shouldn't IEvent.Copy() do a deep copy and return a new instance with all things copied over, not just references?
I am doing all this because permanentEvent.getOccurrences(startTime, endTime) is returning occurences with just the start time set correctly and duration 0 (I see no end time anyway) and I need to calculate end and duration for each occurrence manually by creating a new event and copying stuff from permanentEvent. If getOccurrences() worked fine then I wouldn't have spotted this oddity.
Or maybe it's the lack of documentation that is confusing me. Can we have that documentation please?
The text was updated successfully, but these errors were encountered: