This is a migrated thread and some comments may be shown as answers.

Foundation.ModelNotImplementedException on TKCalendarEventProtocol

1 Answer 93 Views
Calendar - Xamarin.iOS
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 16 Feb 2015, 10:06 AM
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






1 Answer, 1 is accepted

Sort by
0
Accepted
Yoanna
Telerik team
answered on 17 Feb 2015, 09:52 AM
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.

 
Tags
Calendar - Xamarin.iOS
Asked by
Martin
Top achievements
Rank 1
Answers by
Yoanna
Telerik team
Share this question
or