Possible bug: exception if non-existent value is requested
When I include "endDate" in my output I run into an exception. Since not all of my events have an end date/time, is is possible that the project doesn't handle this situation?
I can check for the existence of "endDate" in my own code, but I figured that it would be better if it were handled by the project.
The endDate is a nullable value. That's because its not always you want to show an end date and you could also have a never-ending recurring event. If is't not allowed with empty endDate you can not have this unless you set a specified endDate in a distant future and check for that date when you print.
For now I think its just as easy to use (ce.endDate.HasValue ? ce.endDate.Value.ToString("dd.MM.yyyy") : "") while showing the event, rather than check if endDate is set to a specific date in distant future.
This is my point of view, but feel free to share your thoughts and suggestions for changing this and I might reconsider. :)
However, it would still make sense to me to ensure that the KS.Calendar module would handle the condition. That way an integrator wouldn't run into an unpleasant surprise if he or she merely dropped the project into an install without considering the whether some values might be nullable.
Since the project is more or less a black (gray?) box that stands on its own, it would be good if it handled those situations.
Possible bug: exception if non-existent value is requested
When I include "endDate" in my output I run into an exception. Since not all of my events have an end date/time, is is possible that the project doesn't handle this situation?
I can check for the existence of "endDate" in my own code, but I figured that it would be better if it were handled by the project.
The endDate is a nullable value. That's because its not always you want to show an end date and you could also have a never-ending recurring event. If is't not allowed with empty endDate you can not have this unless you set a specified endDate in a distant future and check for that date when you print.
For now I think its just as easy to use (ce.endDate.HasValue ? ce.endDate.Value.ToString("dd.MM.yyyy") : "") while showing the event, rather than check if endDate is set to a specific date in distant future.
This is my point of view, but feel free to share your thoughts and suggestions for changing this and I might reconsider. :)
That's exactly what I was going to do :-)
However, it would still make sense to me to ensure that the KS.Calendar module would handle the condition. That way an integrator wouldn't run into an unpleasant surprise if he or she merely dropped the project into an install without considering the whether some values might be nullable.
Since the project is more or less a black (gray?) box that stands on its own, it would be good if it handled those situations.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.