Results 1 to 12 of 12
  1.    #1  
    I dont understand it.. I was going to try to learn some basics with help of the Oreilly´s palm web os book...

    I´m following to book step by step but I´m already stuck in the second chapter.. I created the application, created the first scene, added by typing the code according the book, started the application and I see only a blank screen.. ok. so I copy and paste all the code which was required... so there shouldnt be any typos... but still.. I see only a blank screen...

    I dont understand.. am I really stupid?

    can somebody look into it - I have attached what I have created
    I´m sure somebody familiar with coding (and perhaps also with Oreilly´s book) can find what I did wrong in just a few seconds...

    thank you in advance
  2. #2  
    I don't see any attachments. Can you re-attach it, or is the forum not allowing it yet?

    Those blank screens can be frustrating. I got a lot of those in the first few chapters of the book. After a while I found that the best way to diagnose them is using a combination of the log and the debugger. The log is easier to use and will usually give you a clue to the general area and nature of the problem, then you can start the debugger and set a break point in that area. The debugger will be pretty specific about what breaks.
  3.    #3  
    hmm. I went out of my home and then I realized that I forgot to attach it.. doing it right now...
    Attached Files Attached Files
  4.    #4  
    Quote Originally Posted by zelmo View Post
    I don't see any attachments. Can you re-attach it, or is the forum not allowing it yet?

    Those blank screens can be frustrating. I got a lot of those in the first few chapters of the book. After a while I found that the best way to diagnose them is using a combination of the log and the debugger. The log is easier to use and will usually give you a clue to the general area and nature of the problem, then you can start the debugger and set a break point in that area. The debugger will be pretty specific about what breaks.
    ok.. how to use the debugger... this is something I still dont know how :-)
  5. #5  
    No, you are not stupid, at least not because your code based on examples from the O'Reilly book don't work. It was outdated before it hit shelves! Tons of examples in the book are wrong. That said, it is still good for general reference info.

    Blank screens can be caused by a range of things, from very minor to very major. I haven't looked at your code yet, I'll let you know if I find anything wrong...
    Last edited by Laxidasical; 02/25/2010 at 01:14 AM. Reason: Typo
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  6. #6  
    Wow, this was a hard bug to find, since the log and debugger didn't suggest anything at all. The problem turned out to be in the index.html file.
    This line:
    Code:
    <script src="/usr/lib/mojo/framework/mojo.jsjsjs&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$;&$gt$;
    should be this:
    Code:
    <script src="/usr/palm/frameworks/mojo/mojo.jsjsjs&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$; /&$gt$;
    As you can see, the on-device path to the Mojo framework is different. The framework has the commands to load the app code and start the stage assistant, so with the HTML file looking in the wrong place for the framework, no JavaScript was being run at all.
  7. #7  
    Zelmo beat me to it!!! I came on to post the same thing.

    I found it by using palm-generate to build a new app with the same scene, then used the code in the assistant and view file that you posted and voila, it worked! That told me that there was nothing wrong with your code itself (in those files), so I started replacing other files one by one...appinfo.json, sources.json, and finally index.html.

    I'm guessing you aren't using palm-generate to build apps and scenes. It will help greatly...
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL
  8.    #8  
    guys.. thank you....

    only I´m a bit worried right now... if it is really outdated...

    is there any other book or some good references where to start if I chose not to go the way of this book?

    and once again, thank you both guys!
  9.    #9  
    Quote Originally Posted by Laxidasical View Post
    Zelmo beat me to it!!! I came on to post the same thing.

    I found it by using palm-generate to build a new app with the same scene, then used the code in the assistant and view file that you posted and voila, it worked! That told me that there was nothing wrong with your code itself (in those files), so I started replacing other files one by one...appinfo.json, sources.json, and finally index.html.

    I'm guessing you aren't using palm-generate to build apps and scenes. It will help greatly...
    I´m using the palm-*
    generate
    package
    install

    But I probably replaced the code with the one in the book... completly
  10.    #10  
    still fighting with it

    even when replacing the line.. and even when generating a new app to have a "clean" generated index.html... and then copying the line... blank screen...

    I searched my computer for mojo.jsjsjs
    and the only one I was able to find was in:
    c:\Program Files\Palm\SDK\share\refcode\webos-framework\200.72\
    could this be te issue?

    I tried to modify the line like:

    <script src="/usr/palm/SDK/share/refcode/webos-framework/200.72/mojo.jsjsjs&$quot$; $type$=&$quot$;$text$/$javascript$&$quot$; $x$-$mojo$-$version$=&$quot$;$1$&$quot$; /&$gt$;
    but still no go...
  11. #11  
    The Mojo framework is on the phone itself (or in the emulated phone's filesystem, if using the emulator), so if you want to find its exact location, you'll need to go into Novaterm first. But the best way to make sure you have the right boilerplate code is to use the most recent version of the SDK.

    I wouldn't worry about the book being a bit out of date--aside from changes that are taken care of by the SDK tools (like the index.html file), most of what's new is added features. The book code should still work and does a great job of illustrating how a full app comes together.

    Have you started to get your feet wet with the log and debugger yet? I know the debugger is a royal pain, but it's the best thing for pin-pointing problems.
  12. #12  
    What Zelmo said...

    Also, I'd start over from scratch using palm-generate again, only this time only change code in your storyView & stage assistant & view files (and appinfo.json of course). That's what I did and it worked great.

    Oh yeah, you don't need semi-colons to end your main functions (not that I think it would stop anything)...
    Code:
    StoryViewAssistant.prototype.setup = function()
    {
      // your code here
    }; <- not needed!
    MoBill - Use your Authorize.net account to bill your customers with your webOS device!!
    MoJack - Track your lost or stolen webOS device from anywhere!
    Time to get VIRAL

Posting Permissions