have started creating the News application as per the 'Palm WebOS' book, but after creating the data structures and attempting to run the app I am getting a blank screen.
I've attached the debugger and it is complaining of the following:
Code:
2009-07-28T13:06:30.925237Z [1670] qemux86 user.err LunaSysMgr: {LunaSysMgrJS} co.uk.ldj.news: Uncaught SyntaxError: Unexpected token :, file:///var/usr/palm/applications/co.uk.ldj.news/app/assistants/stage-assistant.jsjsjs:$18$
Line 18 of the stage-assistant.jsjsjs $file$ $is$ $as$ $follows$:
Code:
Code:
feedList.push({title:"New York Times", url:"h**p://w*w.nytimes.com/services/xml/rss/nyt/HomePage.xml", type:"rss", numUnRead:0, stories:[]});
I've double checked the text with the book (and even copied and pasted what was in the PDF, but I cannot get past this error...
Hereis the full debug output:
Code:
Code:
2009-07-28T13:06:29.531984Z [1669] qemux86 user.crit fileindexer[1070]: Failed to get path details: /media/internal/developer/_tmpdir_co.uk.ldj.news_1.0.0_all.ipk/control.tar.gz
2009-07-28T13:06:29.581795Z [1669] qemux86 user.crit fileindexer[1070]: Failed to get path details: /media/internal/developer/_tmpdir_co.uk.ldj.news_1.0.0_all.ipk/data.tar.gz
2009-07-28T13:06:29.631252Z [1669] qemux86 user.crit fileindexer[1070]: Failed to get path details: /media/internal/developer/_tmpdir_co.uk.ldj.news_1.0.0_all.ipk/controlTmp
2009-07-28T13:06:30.665636Z [1670] qemux86 user.info LunaSysMgr: {LunaSysMgrJS} co.uk.ldj.news: =========> looking for palmInitFramework191_14, file:///var/usr/palm/applications/co.uk.ldj.news/index.html:0
2009-07-28T13:06:30.666335Z [1670] qemux86 user.info LunaSysMgr: {LunaSysMgrJS} co.uk.ldj.news: =========> Calling palmInitFramework191_14, file:///var/usr/palm/applications/co.uk.ldj.news/index.html:0
2009-07-28T13:06:30.925237Z [1670] qemux86 user.err LunaSysMgr: {LunaSysMgrJS} co.uk.ldj.news: Uncaught SyntaxError: Unexpected token :, file:///var/usr/palm/applications/co.uk.ldj.news/app/assistants/stage-assistant.jsjsjs:$18$
$2009$-$07$-$28T13$:$06$:$30$.$935444Z$ [$1670$] $qemux86$ $user$.$info$ $LunaSysMgr$: {$LunaSysMgr$} $PAGE$ $LOAD$: $file$:///$var$/$usr$/$palm$/$applications$/$co$.$uk$.$ldj$.$news$/$index$.$html$ $561$ $ms$
$2009$-$07$-$28T13$:$06$:$30$.$949761Z$ [$1670$] $qemux86$ $user$.$err$ $LunaSysMgr$: {$LunaSysMgrJS$} $co$.$uk$.$ldj$.$news$: $Error$: $The$ $scene$ '$main$' $could$ $not$ $be$ $pushed$ $because$ $an$ $exception$ $occurred$., $file$:///$var$/$usr$/$palm$/$applications$/$co$.$uk$.$ldj$.$news$/$index$.$html$:$0$
$2009$-$07$-$28T13$:$06$:$30$.$951930Z$ [$1670$] $qemux86$ $user$.$err$ $LunaSysMgr$: {$LunaSysMgrJS$} $co$.$uk$.$ldj$.$news$: $Error$: $Error$: $require$ $Failed$: $The$ $scene$ $assistant$ '$MainAssistant$' $is$ $not$ $defined$. $Did$ $you$ $remember$ $to$ $include$ $it$ $in$ $index$.$html$?, $line$ $undefined$, $file$ $undefined$, $file$:///$var$/$usr$/$palm$/$applications$/$co$.$uk$.$ldj$.$news$/$index$.$html$:$0$
And here is the full JSJSJS $source$ $for$ $the$ $stage$-$assistant$.$js$
Code:
Code:
//Globals - used throughout the News application
//
var feedList = []; // News feed list
// Feedlist entry is:
// feedList[x].title String Title entered by user
// feedList[x].url String Feed source URL in unescaped form
// feedList[x].type String Feed type: either rdf (rss1), rss (rss2) or atom
// feedList[x].numUnRead Integer How many stories are still unread
// feedList[x].stories Array Each entry is a complete story:
// feedList[x].stories[y].title String Story title or headline
// feedList[x].stories[y].text String Story text
// feedList[x].stories[y].unReadStyle String Style to apply when unRead
// feedList[x].stories[y].url String Story url
//
// Push default feeds onto list
feedList.push({title:"New York Times", url:"h**p://w*w.nytimes.com/services/xml/rss/nyt/HomePage.xml", type:"rss", numUnRead:0, stories:[]});
feedList[0].stories.push((title: "Obama warns of prospects for trillion dollar deficits",
text: "Barack Obama delivered a stark assessment of the economy saying that his administration would be forced to impose tighter discipline on government.",
unReadStyle: "unReadStyle",
url: "h**p://w*w.nytimes.com/2009/01/07/world/asia/07india.html?_r=1&partner=rss&emc=rss"});
feedList[0].stories.push({title: "Hundreds of Coal Ash Dumps Lack Regulation",
text: "Most of the coal byproduct dumps across the United States are unregulated, although they contain chemicals considered as threats to human health.",
unReadStyle: "unReadStyle",
url: "h**p://w*w.nytimes.com/2009/01/06/world/asia/06iqbal.html?partner=rss&emc=rss"});
feedList[0].stories.push({title: "Gazprom Dispute Entangles Europe",
text: "Russia's gas price dispute with Ukraine escalated, disrupting deliveries to the European Union in the midst of a bitter cold spell.",
unReadStyle: "unReadStyle",
url: "h**p://w*w.nytimes.com/2009/01/07/world/europe/07gazprom.html?partner=rss&emc=rss"});
feedList[0].stories.push({title: "Green Inc.: Cities Target Lending to Speed Energy Projects",
text: "A number of municipalities across the country are getting creative and experimenting with incremental, neighborhood- or district-based lending programs that help homeowners pay the up-front capital costs for efficiency or renewable energy projects.",
unReadStyle: "unReadStyle",
url: "h**p://greeninc.blogs.nytimes.com/2009/01/06/cities-use-creative-targeted-lending-to-speed-energy-projects/?partner=rss&emc=rss"});
var curFeedIndex = 0; //Tracks the current index for feedlist updates
var curFeedSource = feedList[0];
//CONSTANTS
var unReadFormatting = "unReadStyle"; //Prepend to story when unread
function StageAssistant() {
}
StageAssistant.prototype.setup = function() {
this.controller.pushScene("storyView", curFeedSource, curFeedIndex);
};
Has anyone encountered this problem to know what i've not done?
Thanks