From a9a526f3ccbfa637b9794a17eb26f16023a15414 Mon Sep 17 00:00:00 2001 From: Michael Prager Date: Thu, 14 Jan 2010 13:38:14 +0100 Subject: [PATCH] check for backward compatibility before trying to access device object --- comingNext/index.html | 5 ++++- comingNextB/index.html | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/comingNext/index.html b/comingNext/index.html index 720ce3d..965702f 100644 --- a/comingNext/index.html +++ b/comingNext/index.html @@ -662,7 +662,10 @@ function init() try { // call calendar service - calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + if (device != "undefined") + calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + else + throw('device object does not exist'); } catch(e) { error('loading Calendar service: ' + e + ', line ' + e.line); return; diff --git a/comingNextB/index.html b/comingNextB/index.html index e743a65..965702f 100644 --- a/comingNextB/index.html +++ b/comingNextB/index.html @@ -60,7 +60,7 @@ var config = { //------------------------------------------------------- // Nothing of interest from here on... //------------------------------------------------------- -var panelNum = 1; // use 1 for second panel +var panelNum = 0; // use 1 for second panel var version = "1.25"; var calendarService = null; var cacheEntriesHtml = []; @@ -662,7 +662,10 @@ function init() try { // call calendar service - calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + if (device != "undefined") + calendarService = device.getServiceObject("Service.Calendar", "IDataSource"); + else + throw('device object does not exist'); } catch(e) { error('loading Calendar service: ' + e + ', line ' + e.line); return; -- 2.39.2