The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

abdallah1986 (1) [Avatar] Offline
Greeting every body

i was trying to take a sencha code offline following this tutorial
but this tutorial is most relevant to sencha 1.x and i am starting to use sencha 2.x so i tried to follow this tutorial to solve the problem

but i still have some issues because i am just starting with sencha touch and i will be thankfull if someone could help me with this.

This is my code:

Ext.define("Photo", {
extend: "",
config: {
fields: [
setUrl: function() {
var url = "http://farm" + this.get('farm') +
"" + this.get('server') +
"/" + this.get('id') + "_" + this.get('secret') + "_s.jpg";
var script = document.createElement("script");
"" + this.getId() +
"/" + url
name: "helloworld",
setPhotoUrl: function (id, dataUrl) {
var photo = this.offlineStore.getById(id);
photo.set('url', dataUrl);

onlineStore: Ext.define("onlineStore", {
extend: "",
config: {
model: 'Photo',
proxy: {
type: 'scripttag',
url: '' +
'select * from where text="hello" limit 10'
reader: Ext.define("reader", {
extend: "",
root: ''
timeout: 2000,
listeners: {
exception:function () {
console.log("I think we are offline");;
offlineStore: Ext.define("offlineStore", {
extend: "",
config: {
model: 'Photo',
proxy: {
type: 'localstorage',
id: 'helloworld'
launch: function() {
this.tabs = new Ext.TabPanel({
fullscreen: true,
dockedItems: [{xtype:'toolbar', title:'Hello World'}],
tabBar: {
ui: 'light',
layout: {
pack: 'center'
items: [
{cls:'hello', title:'Hello'},
{cls:'world', title:'World'},
cls: 'gallery',
title: 'Gallery',
xtype: 'list',
store: null,
}); = this.tabs.items.getAt(2);

this.onlineStore.addListener('load', function () {
console.log("I think we are online");
this.each(function (record) {
var photo = helloWorld.offlineStore.add([0];


chrome developer tools console shows me those error:

Uncaught TypeError: Object #<Object> has no method 'Application' app.js:27
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/offline/sdk/src/data/proxy/OnlineStorage.js?_dc=1338287734798
Uncaught Error: [Ext.Loader] Failed loading 'http://localhost/offline/sdk/src/data/proxy/OnlineStorage.js', please verify that the file exists sencha-touch.js:8017

i have tried to solve this but i didn't find what really is the mistake.

is some help available please? thank you
mitchellsimoens (12) [Avatar] Offline
Re: problem taking sencha app offline with sencha 2
@abdallah1986 This forum is for the book and your question is not about the book. You may find more help at