Foundation.ModelNotImplementedException on TKCalendarEventProtocol

2 posts, 1 answers
  1. Martin
    Martin avatar
    7 posts
    Member since:
    Jan 2015

    Posted 16 Feb 2015 Link to this post

    Hi

    Have updated to the latest version of Telerik.Xamarin.iOS (2014.3.1326.0) to use in a Xamarin Unified API project.

    Implement

    override TKCalendarEventProtocol[] EventsForDate (TKCalendar calendar, NSDate date)
    {
            return new TKCalendarEventProtocol [] {
                new TKCalendarEventProtocol {
                    StartDate = date,
                    EndDate = date
                }
            };
    }


    and get error

    Foundation.ModelNotImplementedException: Exception of type 'Foundation.ModelNotImplementedException' was thrown.
    at TelerikUI.TKCalendarEventProtocol.set_StartDate (Foundation.NSDate value)


    This worked fine before the upgrade to the latest Telerik. Please help?

    Thanks

    Martin






  2. Answer
    Yoanna
    Admin
    Yoanna avatar
    44 posts

    Posted 17 Feb 2015 Link to this post

    Hello, Martin, 

    Thank you for contacting us.

    TKCalendarEventProtocol is just an abstract interface describing an event in TKCalendar. Adopting this interface allows using custom business objects as data source for TKCalendar.  Its default implementation is TKCalendarEvent. You have two options when handling EventsForDate method. The first one is to replace TKCalendarEventProtocol with its default implementation - TKCalendarEvent. The second one is creating your own class which inherits from TKCalendarEventProtocol.

    I hope this helps, If you have any questions do not hesitate to contact us.

    Regards,
    Yoanna
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top