<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>润物无声 &#187; WebApp</title>
	<atom:link href="http://blog.zhourunsheng.com/tag/webapp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zhourunsheng.com</link>
	<description>天空一朵雨做的云</description>
	<lastBuildDate>Sat, 08 May 2021 05:17:21 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Sencha Touch 程序设计之 Android 平台 Back 按键处理</title>
		<link>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%b9%8b-android-%e5%b9%b3%e5%8f%b0-back-%e6%8c%89%e9%94%ae%e5%a4%84%e7%90%86/</link>
		<comments>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%b9%8b-android-%e5%b9%b3%e5%8f%b0-back-%e6%8c%89%e9%94%ae%e5%a4%84%e7%90%86/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:23:40 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[移动开发]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[Sencha]]></category>
		<category><![CDATA[WebApp]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=1406</guid>
		<description><![CDATA[<p>利用 Sencha Touch 结合PhoneGap设计本地APP，免不了要分别处理android平台和iph [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%b9%8b-android-%e5%b9%b3%e5%8f%b0-back-%e6%8c%89%e9%94%ae%e5%a4%84%e7%90%86/">Sencha Touch 程序设计之 Android 平台 Back 按键处理</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>利用 Sencha Touch 结合PhoneGap设计本地APP，免不了要分别处理android平台和iphone平台，两个平台的最大区别之一就是back键的处理。iphone平台没有back按键，只有home按键，按下该键的话程序会自动转入后台处理，该按键的效用等同于android平台的home按键，但是，android平台特殊的地方在于，它还有一个back键，熟悉了android平台的开发者或使用者，把该键的作用理解为退回程序的上一个页面，如果程序已经在主页面，此时则退出程序。</p>
<p>因为Sencha Touch对android平台进行了消息封装，默认对back键的处理，同home键的处理一致，这令很多android开发者或使用者使用其功能的话不太友好，我自己在调试程序的过程中就误操作过了N次，每次按下back键期望程序回退到上一个页面，没想到程序直接消失了，转到后台去了。<span id="more-1406"></span></p>
<p>网上搜索了一些解决方案，各有利弊，汇总贴可参照Sencha Touch官方论坛《<a href="http://www.sencha.com/forum/showthread.php?133948-Why-can-t-I-control-Android-phone-s-hardware-Back-button-in-Sencha-with-PhoneGap">Why-can-t-I-control-Android-phone-s-hardware-Back-button-in-Sencha-with-PhoneGap</a>》，下面介绍一下我设计的一个解决方案，在实测环境中工作良好，总结如下：</p>
<p>1. 首先在Sencha 启动代码中捕获android平台的back按键消息，阻止Sencha 框架的默认处理</p>
<pre>var App = new Ext.application({
 // ... APP 配置参数

 launch : function () {
  // ... 界面初始化
   BBGlobalData.mainPanel = Ext.create('Ext.Panel', {
       fullscreen: true,
       layout : 'card',
       cardAnimation : 'slide',
       items: [
           Ext.create('BBShow.view.LoginPanel'),
           Ext.create('BBShow.view.HomePanel'),
           Ext.create('BBShow.view.MediaPanel'),
           Ext.create('BBShow.view.PicCarousel'),
           Ext.create('BBShow.view.ReportListPanel'),
           Ext.create('BBShow.view.ReportPanel'),
       ]
   });

   Ext.Viewport.add(BBGlobalData.mainPanel);

   document.addEventListener('deviceready', function () {
     console.log('deviceready');
     document.addEventListener("backbutton", function () {
           console.log('user presses the back button on Android');
           // 获取当前的焦点页面，并发送自定义消息'back'
           BBGlobalData.mainPanel.getActiveItem().fireEvent('back');
    }, false);
  }, false);
}
})</pre>
<p>2. 在子页面中注册back消息的监听器</p>
<pre>/*定义登录面板*/
Ext.define('BBShow.view.LoginPanel', {
extend: 'Ext.Panel',

    config: {
      items: [
      {
        xtype: 'titlebar',
        docked: 'top',
        title: '用户登录'
      },
      // 其他页面内容
     ],
    listeners: [
     {
      fn: 'onBack',
      event: 'back', //注册监听自定义back按键消息
     }
    ]
  },

  onBack: function() {
    //BBGlobalData.gotoHomePanel(); //如，跳转到其他页面
    BBGlobalData.exitApp(); //或退出程序
  },
});</pre>
<p>3. 实现退出程序的处理，借助于PhoneGap</p>
<pre>   BBGlobalData.exitApp = function() {
   navigator.app.exitApp();
}</pre>
<p>4. 实现页面跳转的处理（主页面采用card view，类似于扑克的翻牌）</p>
<pre>BBGlobalData.gotoHomePanel = function() {
   BBGlobalData.mainPanel.setActiveItem(1);
}</pre>
<p>总结：其实总的解决方法还是很简单，只要把整体的框架搭建完善了，很容易就能在多平台之间转换了。</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%b9%8b-android-%e5%b9%b3%e5%8f%b0-back-%e6%8c%89%e9%94%ae%e5%a4%84%e7%90%86/">Sencha Touch 程序设计之 Android 平台 Back 按键处理</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%b9%8b-android-%e5%b9%b3%e5%8f%b0-back-%e6%8c%89%e9%94%ae%e5%a4%84%e7%90%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sencha Touch 程序设计体验之笔记本</title>
		<link>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%bd%93%e9%aa%8c%e4%b9%8b%e7%ac%94%e8%ae%b0%e6%9c%ac/</link>
		<comments>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%bd%93%e9%aa%8c%e4%b9%8b%e7%ac%94%e8%ae%b0%e6%9c%ac/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 07:48:17 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[移动开发]]></category>
		<category><![CDATA[Sencha Touch]]></category>
		<category><![CDATA[WebApp]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=1377</guid>
		<description><![CDATA[<p>这几天进行进行 webmobile App的设计，起初的设计方案采用的是 Jquery Mobile + Ph [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%bd%93%e9%aa%8c%e4%b9%8b%e7%ac%94%e8%ae%b0%e6%9c%ac/">Sencha Touch 程序设计体验之笔记本</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>这几天进行进行 webmobile App的设计，起初的设计方案采用的是 Jquery Mobile + PhoneGap，原想应该工作的不错，没想到到了最后，进行程序结合测试的时候出现了一个莫名奇妙的问题，那就是，利用Jquery Mobile进行页面切换，反复进行七次以上的连环页面跳转，同时在后台发送 Ajax数据请求，从服务器download数据，就会破坏PhoneGap的本地工作机制，导致后面的PhoneGap本地函数调用无法正常进行，PhoneGap的工作原理也是ajax通信机制，在环境出错的情况下，总是返回status = 0的状态，无奈解决了两天还是没有彻底解决，现在着手试着另一套界面设计框架Sencha Touch。</p>
<p>学习Sencha Touch，改写了别人的一个APP，一个记事本程序，详细的E文请参照《<a href="http://miamicoder.com/2011/writing-a-sencha-touch-application-part-1/">writing a sencha touch application</a>》。</p>
<p>笔记本程序的运行效果图如下(分别是笔记列表和笔记编辑页面)：<br />
<img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/05.jpg" alt="notelist" width="224" height="442" /><img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/07.jpg" alt="noteedit" width="224" height="442" /><span id="more-1377"></span></p>
<p>当时设计该程序的代码基于Sencha Touch1.1.0，现在Sencha Touch已经发布了2.0版本，所以里面有很多代码已经无法正常工作了，本文还是按照作者当初的设计思路，重新基于Sencha Touch2.0进行了编码工作，程序已经可以正常运行，后面附上本程序的JS源码：</p>
<pre>var App = new Ext.application({
name : 'NotesApp',
useLoadMask : true,

launch : function () {
notesListToolbar = Ext.create('Ext.Toolbar', {
id: 'notesListToolbar',
docked: 'top',
title: '记事本',
layout: 'hbox',
items: [
{ xtype: 'spacer' },
{
id: 'newNoteButton',
text: '新建笔记',
ui: 'action',
handler: function () {
var now = new Date();
var noteId = now.getTime();
var note = Ext.ModelMgr.create(
{ id: noteId, date: now, title: '', narrative: '' },
'Note'
);

noteEditor.setRecord(note);
Ext.Viewport.setActiveItem('noteEditor', {type: 'slide', direction: 'left'});
}
}
]
});

Ext.regModel('Note', {
idProperty: 'id',
fields: [
{ name: 'id', type: 'int' },
{ name: 'date', type: 'date', dateFormat: 'c' },
{ name: 'title', type: 'string' },
{ name: 'narrative', type: 'string' }
],
validations: [
{ type: 'presence', field: 'id' },
{ type: 'presence', field: 'title', message: '请输入笔记的标题!' }
]
});

Ext.regStore('NotesStore', {
model: 'Note',
sorters: [{
property: 'date',
direction: 'DESC'
}],
proxy: {
type: 'localstorage',
id: 'notes-app-localstore'
},
getGroupString: function (record) {
if (record &amp;&amp; record.data.date) {
return record.get('date').toDateString();
} else {
return '';
}
},
});

notesList = Ext.create('Ext.List', {
id: 'notesList',
store: 'NotesStore',
grouped: true,
emptyText: '&lt;div style="margin: 5px;"&gt;目前还没有创建笔记.&lt;/div&gt;',
loadingText: '正在读取笔记 ...',
itemTpl: '&lt;div class="list-item-title"&gt;{title}&lt;/div&gt;' +
'&lt;div class="list-item-narrative"&gt;{narrative}&lt;/div&gt;',
onItemDisclosure: function (record) {
var selectedNote = record;
noteEditor.setRecord(selectedNote);
Ext.Viewport.setActiveItem('noteEditor', { type: 'slide', direction: 'left' });
},
listeners: {
'render': function (thisComponent) {
thisComponent.getStore().load();
},
}
});

notesListContainer = Ext.create('Ext.Panel', {
id : 'notesListContainer',
layout : 'fit',
items: [notesListToolbar, notesList],
html: 'This is the notes list container'
});

noteEditorTopToolbar = Ext.create('Ext.Toolbar', {
title: '编辑笔记',
docked: 'top',

items: [
{
text: '记事本',
ui: 'back',
handler: function () {
Ext.Viewport.setActiveItem('notesListContainer', { type: 'slide', direction: 'right' });
}
},
{ xtype: 'spacer' },
{
text: '保存',
ui: 'action',
handler: function () {
var currentNote = noteEditor.getRecord();
// Update the note with the values in the form fields.
noteEditor.updateRecord(currentNote);

var errors = currentNote.validate();
if (!errors.isValid()) {
currentNote.reject();
Ext.Msg.alert('请等待...', errors.getByField('title')[0].getMessage(), Ext.emptyFn);
return;
}

var notesStore = notesList.getStore();

if (notesStore.findRecord('id', currentNote.data.id) === null) {
notesStore.add(currentNote);
} else {
currentNote.setDirty();
}

notesStore.sync();
notesStore.sort([{ property: 'date', direction: 'DESC'}]);

notesList.refresh();

Ext.Viewport.setActiveItem('notesListContainer', { type: 'slide', direction: 'right' });
}
}
]
});

noteEditorBottomToolbar = Ext.create('Ext.Toolbar', {
docked: 'bottom',

items: [
{ xtype: 'spacer' },
{
iconCls: 'trash',
iconMask: true,
handler: function () {
var currentNote = noteEditor.getRecord();
var notesStore = notesList.getStore();

if (notesStore.findRecord('id', currentNote.data.id)) {
notesStore.remove(currentNote);
}

notesStore.sync();

notesList.refresh();
Ext.Viewport.setActiveItem('notesListContainer', { type: 'slide', direction: 'right' });
}
}
]
});

noteEditor = Ext.create('Ext.form.FormPanel',{
id: 'noteEditor',
items: [
noteEditorTopToolbar,
{
xtype: 'textfield',
name: 'title',
label: '笔记标题',
required: true
},
{
xtype: 'textareafield',
name: 'narrative',
label: '笔记内容'
},
noteEditorBottomToolbar
]
});

mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
layout : 'card',
cardAnimation : 'slide',
items: [notesListContainer, noteEditor]
});

Ext.Viewport.add(mainPanel);
}
})</pre>
<p>有兴趣学习Sencha Touch的童鞋，该sample还是一个不错的入门选择，接下来再挑选几个不错的sample来update。</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%bd%93%e9%aa%8c%e4%b9%8b%e7%ac%94%e8%ae%b0%e6%9c%ac/">Sencha Touch 程序设计体验之笔记本</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2012/04/sencha-touch-%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e4%bd%93%e9%aa%8c%e4%b9%8b%e7%ac%94%e8%ae%b0%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>编写 PhoneGap 程序调试问题解决方案</title>
		<link>http://blog.zhourunsheng.com/2012/03/%e7%bc%96%e5%86%99-phonegap-%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/</link>
		<comments>http://blog.zhourunsheng.com/2012/03/%e7%bc%96%e5%86%99-phonegap-%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 02:22:15 +0000</pubDate>
		<dc:creator><![CDATA[润物无声]]></dc:creator>
				<category><![CDATA[移动开发]]></category>
		<category><![CDATA[PhoneGap]]></category>
		<category><![CDATA[WebApp]]></category>

		<guid isPermaLink="false">http://blog.zhourunsheng.com/?p=1353</guid>
		<description><![CDATA[<p>这几天做项目，需要设计一个和服务器交互的库，同时也有一个提高效率的需求就是设计缓存机制，无奈PhoneGap提 [&#8230;]</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/03/%e7%bc%96%e5%86%99-phonegap-%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/">编写 PhoneGap 程序调试问题解决方案</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>这几天做项目，需要设计一个和服务器交互的库，同时也有一个提高效率的需求就是设计缓存机制，无奈PhoneGap提供的API太坑爹了，编写个缓存费了N大的劲才完成，记录一下要注意的地方。</p>
<p>1. 客户端浏览器调试Ajax请求报错“<span style="color: #ff0000;">Origin null is not allowed by Access-Control-Allow-Origin</span>. ”</p>
<p>解决办法：谷歌浏览器 <code>chrome.exe --disable-web-security</code></p>
<p>2. PhoneGap 远程调试</p>
<p>远程调试架构图如下所示：</p>
<p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/02.jpg" alt="remote_debugging_architecture" width="500" height="357" /></p>
<p><span id="more-1353"></span></p>
<p>配置步骤如下：</p>
<p>a. 登录网址：<a href="http://debug.phonegap.com/">http://debug.phonegap.com/</a> 填写配置信息</p>
<p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/06.jpg" alt="debug_phonegap_getting_started" width="500" height="162" /></p>
<p>b. 在本地代码中引用远程调试JS代码文件</p>
<p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/03.jpg" alt="debug_phonegap_client" width="500" height="235" /></p>
<p>c. 打开远程调试窗口<a href="http://debug.phonegap.com/client/#bbshow">http://debug.phonegap.com/client/#bbshow</a> （bbshow为第一步骤配置的名字）</p>
<p><img src="http://blog.zhourunsheng.com/wp-content/uploads/2012/05/04.jpg" alt="debug_phonegap_server" width="500" height="256" /></p>
<p>在调试窗口中可以修改节点的属性，然后手机上的画面就会自动更新了。</p>
<p>3.  常用的代码总结</p>
<p>a. 设计 Ajax 数据通信（如用户登录）</p>
<pre>/*
用户登录模块

params = {};
params.username 登录用户名
params.password 登录用户密码

succcb  登录成功时候的回调函数 function(data);
errcb   登录失败时候的回调函数 function(text);
*/
function bb_login(params, succcb, errcb)
{
   var tmplate = login_req_xml(params);

   doPost(tmplate, function(data, textStatus, jqXHR) {
      if (data.status == 0) {
          errcb(data.info);
      } else {
          GServerData.curToken = data.data;
          succcb(data.data);
      }
   }, function(jqXHR, textStatus, errorThrown) {
         errcb(textStatus);
   });
}

/*用户登录的模板文件*/
function login_req_xml(params)
{
  var tmplate = '&lt;?xml version="1.0" encoding="utf-8"?&gt;'
       + '&lt;request&gt;'
       + '&lt;operation&gt;'
       + '&lt;module&gt;token&lt;/module&gt;'
       + '&lt;action&gt;login&lt;/action&gt;'
       + '&lt;params&gt;'
       + '&lt;username&gt;' + params.username + '&lt;/username&gt;'
       + '&lt;password&gt;' + params.password + '&lt;/password&gt;'
       + '&lt;/params&gt;'
       + '&lt;/operation&gt;'
       + '&lt;/request&gt;';
   return  tmplate;
}

/*
向服务器发送 POST 请求.

data: 向服务器发送的数据内容
succcb: 成功时候的回调函数 success(data, textStatus, jqXHR)
errcb:  失败时候的回调函数 error(jqXHR, textStatus, errorThrown)
*/
function doPost(data, succcb, errcb)
{
   $.ajax({
      type: "POST",
      url: Config.serverapi,
      data: data,
      cache: false,
      dataType: "json",
      success: succcb,
      error: errcb
   });
}

b.  数据缓存

/*
dataUrl 请求数据的网络URL地址
如果缓存成功，则会返回本地的File地址

succcb 登录成功时候的回调函数 function(data);
errcb 登录失败时候的回调函数 function(text);
*/
function bb_loadCacheData(dataurl, succcb, errcb)
{
  var errorCB = function (err) {
      console.log("Error processing : " + err.code);
      errcb("Error processing : " + err.code);
  }

var downLoadFile = function(db) {
  console.log("downLoadFile ... [" + dataurl + "]");

   //特别备注：在Phonegap1.5.0中，LocalFileSystem.TEMPORARY 和 LocalFileSystem.PERSISTENT 两者相反了
   window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
        var datadate = new Date().getTime();
        var filename = datadate + '_' + dataurl.substr(dataurl.lastIndexOf('/')+1);

        var fileTransfer = new FileTransfer();

        fileTransfer.download(
           dataurl,
           fileSystem.root.fullPath.substr("file://".length) + Config.datacachepath + filename,
           function(entry) {
               console.log("download complete: " + entry.fullPath);
               db.transaction(function (tx) {
                   tx.executeSql('INSERT INTO data_cache (dataurl, datapath, datadate) VALUES ("' + dataurl + '","' + entry.fullPath + '","' + datadate + '")');
               succcb(entry.fullPath);
               }, errorCB);
           },
          function(error) {
              console.log("download error source " + error.source);
              console.log("download error target " + error.target);
              console.log("download error code " + error.code);
              errcb("download error code " + error.code);
          }
      ); 
     }, errorCB);
   };

   var db = window.openDatabase("cache.db", "1.0", "BBShow Data Cache DB", 200000);
   db.transaction(function (tx) {
      tx.executeSql('CREATE TABLE IF NOT EXISTS data_cache (id unique, dataurl, datapath, datadate)');
      tx.executeSql('SELECT * FROM data_cache WHERE dataurl=?', [dataurl], function(tx, results) {
      if (results.rows.length &gt; 0) {
         window.resolveLocalFileSystemURI(results.rows.item(0).datapath, function(fileEntry) {
              console.log(fileEntry.fullPath);
              succcb(fileEntry.fullPath);
         }, function(error) {
              console.log("Unable to resolveLocalFileSystemURI: " + error.code);
              db.transaction(function (tx) {
              tx.executeSql('DELETE FROM data_cache WHERE dataurl=?', [dataurl]);
              downLoadFile(db);
         }, errorCB);
        });
      } else {
          downLoadFile(db);
      }
     }, errorCB);
   }, errorCB);
}</pre>
<p>总之，这两天才发现 PhoneGap不是一般的难用，真应该再多完善完善！！！</p>
<p><a rel="nofollow" href="http://blog.zhourunsheng.com/2012/03/%e7%bc%96%e5%86%99-phonegap-%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/">编写 PhoneGap 程序调试问题解决方案</a>，首发于<a rel="nofollow" href="http://blog.zhourunsheng.com">润物无声</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zhourunsheng.com/2012/03/%e7%bc%96%e5%86%99-phonegap-%e7%a8%8b%e5%ba%8f%e8%b0%83%e8%af%95%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
