I just started writing a app for BB10, and playing around with the calendarEvent object.
function createEvents(location, summary, startTime, endTime, frequency, dayInWeek, expires) {
var testing = blackberry.pim.calendar;
document.write("<p>My First app</p>");
var evt,
calendar = blackberry.pim.calendar,
CalendarRepeatRule = calendar.CalendarRepeatRule;
var start = new Date(startTime);
var end = new Date(endTime);
var location = location;
var summary = summary;
.
.
.
}
I am running this in ripple, but it wont even print out "My First app" when I run this function. In my config.xml I have
Been stuck for hours, any help would be appreciated!
The blackberry.pim.calendar API is not supported by Ripple: https://developer.blackberry.com/html5/apis/blackberry.pim.calendar.html
I suspect that a runtime error is occurring when you set the testing variable inside of createEvents. Open Web inspector to confirm.
Recommend doing feature detection to ensure the object you are about to use is available.
function createEvents(location, summary, startTime, endTime, frequency, dayInWeek, expires) {
if (window.blackberry && blackberry.pim) {
var testing = blackberry.pim.calendar;
document.write("<p>My First app</p>");
var evt,
calendar = blackberry.pim.calendar,
CalendarRepeatRule = calendar.CalendarRepeatRule;
var start = new Date(startTime);
var end = new Date(endTime);
var location = location;
var summary = summary;
} else {
alert("blackberry.pim is not supported");
}
.
.
.
}