Commit fc8362b1 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading

README.md

0 → 100644
+15 −0
Changes for README.md: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
## Example files for the title:  
	  
# Palm webOS, by Mitch Allen
	  
[![Palm webOS, by Mitch Allen](http://akamaicovers.oreilly.com/images/9780596155278/cat.gif)](https://www.safaribooksonline.com/library/view/title/9780596802097//)
	  
The following applies to example files from material published by O’Reilly Media, Inc. Content from other publishers may include different rules of usage. Please refer to any additional usage rights explained in the actual example files or refer to the publisher’s website.
	  
O'Reilly books are here to help you get your job done. In general, you may use the code in O'Reilly books in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from our books does not require permission. Answering a question by citing our books and quoting example code does not require permission. On the other hand, selling or distributing a CD-ROM of examples from O'Reilly books does require permission. Incorporating a significant amount of example code from our books into your product's documentation does require permission.
	  
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN.
	  
If you think your use of code examples falls outside fair use or the permission given here, feel free to contact us at <permissions@oreilly.com>.
	  
Please note that the examples are not production code and have not been carefully testing. They are provided "as-is" and come with no warranty of any kind.

logo.png

0 → 100644
+3.2 KiB
Loading image diff...
+72 −0
Changes for webOS-Book-Source/ ReadMe.rtf: 72 added lines, 0 removed lines.
Original line number Diff line number Diff line
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww13760\viewh10440\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural

\f0\b\fs24 \cf0 News Source Code Bundle - Palm webOS\
August 14, 2009
\b0 \
\
In this bundle you'll find the source code for the full News application as well as versions for each chapter where there are News code samples (Chapters 2-6 & 8-11). This has been tested with SDK 1.1, and we'll continue to test it with each major SDK release and create updates when needed. If you use this code against other versions then just be aware that although unlikely, there may be some changes introduced by later versions of the SDK.\
\
The full source code should be the same as is printed in Appendix D - News Application Source Code in the 1st Edition of the book and pdf, with the exceptions noted below under 'Source Code Changes'.\
\
Each folder is a fully functional application. The folder titled 'News' is the final version, while each of the chapter versions are titled 'News-#', where # corresponds to the chapter number. News-3 is the version of the application as of the END of the chapter. This is important as several chapters, particularly 3, 4, 5 and 10, have several versions within them. If there is enough interest then we may create intermediate versions for those chapters as well.\
\
Within each folder is a text file, title 'Notes'. In the full News application, this repeats the code changes noted below, but in the chapter versions, we've attempted to summarize the changes. The book does a much better job summarizing the changes, but it may help you to refer to the notes if you don't have the book handy.\
\

\b Deltas from Appendix D
\b0 \
\
Based on reader input (thanks very much to everyone who reported bugs in the sample code) and a couple that I found in reviewing the code, this code package has the following changes made to the code shown in the book and in Appendix D.\
\

\b News/app/assistants/feedList-assistant.js:
\b0 \
\
\'95 Bug with failure cases on AddDialogAssistant; use sceneAssistant's controller methods:\
    replace this.controller.get('add-feed-title) with this.sceneAssistant.controller.get('add-feed-title') in checkSuccess:\
        var addFeedTitleElement = this.sceneAssistant.controller.get("add-feed-title");\
        addFeedTitleElement.innerHTML = "Invalid Feed Type - Please Retry";\
        \
    replace this.controller.get('add-feed-title) with this.sceneAssistant.controller.get('add-feed-title') in checkFailure:\
        var addFeedTitleElement = this.sceneAssistant.controller.get("add-feed-title");\
        addFeedTitleElement.innerHTML = "Invalid URL - Please Retry";\
    \
\

\b News/app/models/feeds.js
\b0 \
\'95 Using external partition for storage to avoid 1mb limit imposed on SDK 1.1\
    add 'ext:' prefix to db name in creating or opening the depot\
    this.db = new Mojo.Depot(\
        \{name:"ext:feedDB", version:1, estimatedSize: 100000, replace: false\},\
        this.loadFeedDbOpenOk.bind(this),\
        function(result) \{\
            Mojo.Log.warn("Can't open feed database: ", result);\
        \}\
    );\
    \
\'95 Depot methods simpleGet() and simpleAdd() are deprecated; use get() and add() instead as documented in the book:\
    replace simpleGet() with get() in the loadFeedDbOpenOk method:\
        this.db.get("feedList", this.loadFeedDbGetSuccess.bind(this), this.loadFeedDbUseDefault.bind(this));\
        \
    replace simpleAdd() with add() in the storeFeedDb method:\
        this.db.add("feedList", this.list,\
                function() \{Mojo.Log.info("FeedList saved OK");\}, \
                this.storeFeedDBFailure);\
        \},\
\

\b News/app/assistants/preferences-assistant.js:
\b0 \
\'95\'a0typo in bgUpdateToggle listener setup and removal\
    replace this.changeBgUpdate with this.changeBgUpdateHandler in setup method:\
    this.controller.listen("bgUpdateToggle", Mojo.Event.propertyChange,\
        this.changeBgUpdateHandler);\
        \
    replace this.changeBgUpdate with this.changeBgUpdateHandler in cleanup method:\
    this.controller.stopListening("bgUpdateToggle",\
        Mojo.Event.propertyChange, this.changeBgUpdateHandler);}
 No newline at end of file
+6 KiB

File added.

No diff preview for this file type.

+6 KiB

File added.

No diff preview for this file type.

Loading