Results 1 to 5 of 5
  1.    #1  
    This code in my stage-assistant.jsjsjs $doe$ NOT work (blank screen appears):

    // News namespace
    News = {};

    // Constants
    News.unreadStory = "unReadStyle";


    function StageAssistant () {
    }

    StageAssistant.prototype.setup = function() {
    this.feeds = new Feeds();
    // initialize the feeds model
    // start with the first feed and the first story in the feed
    this.controller.pushScene("storyView", this.feeds.list[0], 0);
    };

    Commenting out the two offending lines produces a complete screen with two buttons. See the same code with the commented out lines:

    function StageAssistant () {
    }

    StageAssistant.prototype.setup = function() {
    //this.feeds = new Feeds();
    // initialize the feeds model
    // start with the first feed and the first story in the feed
    //this.controller.pushScene("storyView", this.feeds.list[0], 0);
    this.controller.pushScene("storyView");
    };

    The screen just contains the two buttons.... now NEWS.

    So apparently the problem is (and I say this without the help of any obvious debugging tools, even using Eclipse) is the creation, initialization and loading of the Feeds object. Anyone have any ideas? Your help will be most appreciated. This Javascript OOP Framework is difficult enough to understand without having published code fail!
  2. #2  
    I am having the same problem.
  3. #3  
    Worked it out. There are two issues with the book's example that need to be fixed. Firstly the author neglected to mention that the Feed.jsjsjs $file$ $needs$ $to$ $be$ $added$ $to$ $the$ $sources$.$json$ $file$. $Second$, $the$ $multiline$ $strings$ $in$ $Feed$.$js$ $need$ $to$ $be$ $changed$ $to$ $single$ $line$ $or$ $the$ + $syntax$ $employed$. $This$ $second$ $problem$ $would$ $have$ $taken$ $about$ $a$ $minute$ $to$ $find$ $ans$ $fix$ $in$ $a$ $real$ $programmong$ $language$ $like$ $java$ $instead$ $of$ $a$ $totally$ $lame$ $scripting$ $language$ $like$ $javascript$. $Thanks$ $Palm$ ($Papple$).
  4. #4  
    Quote Originally Posted by ADGrant View Post
    Worked it out. There are two issues with the book's example that need to be fixed. Firstly the author neglected to mention that the Feed.jsjsjs $file$ $needs$ $to$ $be$ $added$ $to$ $the$ $sources$.$json$ $file$. $Second$, $the$ $multiline$ $strings$ $in$ $Feed$.$js$ $need$ $to$ $be$ $changed$ $to$ $single$ $line$ $or$ $the$ + $syntax$ $employed$. $This$ $second$ $problem$ $would$ $have$ $taken$ $about$ $a$ $minute$ $to$ $find$ $ans$ $fix$ $in$ $a$ $real$ $programmong$ $language$ $like$ $java$ $instead$ $of$ $a$ $totally$ $lame$ $scripting$ $language$ $like$ $javascript$. $Thanks$ $Palm$ ($Papple$).
    lol, javascript may have its flaws, but its good for embedded systems, or just really small computers. Would you really want bloated ol java running on your pre? At least jscript is readable, what if palm went with ruby on rails? It would be awesome, but there would be even more of a learning curve.
    Palm Pilot m100 --> Alltel Razr V3c --> Alltel HTC PPC6800(Mogul) --> Alltel HTC Touch Pro --> Alltel Rokr Z6M --> Alltel Palm Pre

    Speed at 70Mph using MyTether using Alltel Hybrid Rev A
    http://i30.tinypic.com/2iu733d.jpg
  5. #5  
    Quote Originally Posted by adactuslatem View Post
    lol, javascript may have its flaws, but its good for embedded systems, or just really small computers. Would you really want bloated ol java running on your pre? At least jscript is readable, what if palm went with ruby on rails? It would be awesome, but there would be even more of a learning curve.
    I don't consider javascript to be readable, and yes I would rather have java running on my smartphone (on any other compiled programming language). Scripting languages suck for embedded systems development. Compiled languages catch all the stupid typos before the code is loaded onto the emulator or device.

Posting Permissions