摘要: Titanium Studio环境中, 输入Titanium.不出现任何提示!点击Help=>Check for Updates,更新下,查看是否报错!!提示:/Applications/TitaniumStudio/p2/org.eclipse.equinox.p2.repository....//哪出错,找源文件包替换,如果木有,则删除此文件夹再检查更新,等他完成,应该就OK了!出现这样的情况一般就是更新时中途断开,访问文件出错。 阅读全文
posted @ 2012-03-10 17:39 Maxfong 阅读(248) 评论(0) 推荐(0) 编辑
摘要: <script>varsingleton=function(){varuniqueInstance;functionconstructor(){varid='1';functionadd(){returnid+'2';};functionadd1(){return'3';};return{name:'name',method:function(){alert(this.name+add()+add1());}}}return{getInstance:function(){if(!uniqueInstance){uniq 阅读全文
posted @ 2012-03-01 09:12 Maxfong 阅读(202) 评论(0) 推荐(0) 编辑
摘要: varlastRow=4;//初始显示数据functionformatDate(){//此处是获取更新时间vardate=newDate();vardatestr=date.getMonth()+'/'+date.getDate()+'/'+date.getFullYear();if(date.getHours()>=12){datestr+=''+(date.getHours()==12?date.getHours():date.getHours()-12)+':'+date.getMinutes()+'PM 阅读全文
posted @ 2012-02-29 10:54 Maxfong 阅读(1500) 评论(3) 推荐(0) 编辑
摘要: varlastRow=10;//设置默认显示数据varupdating=false;varloadingRow=Ti.UI.createTableViewRow();loadingRow.add(Titanium.UI.createLabel({left:20,textAlign:'center',text:'数据正在加载,请稍候...',//样式可以自己定义font:{fontSize:14,fontFamily:'HelveticaNeue',fontWeight:'bold'}}));functionbeginUpdate( 阅读全文
posted @ 2012-02-29 10:53 Maxfong 阅读(872) 评论(0) 推荐(0) 编辑
摘要: 代码部分:/***Suds:ALightweightJavaScriptSOAPClient一个轻量级的SOAP客户端*Copyright:2009KevinWhinnery(http://www.kevinwhinnery.com)版权:xxx*License:http://www.apache.org/licenses/LICENSE-2.0.html*Source:http://github.com/kwhinnery/Suds源码地址*/functionSudsClient(_options){//Agenericextendfunction-thanksMooTools//定义默认. 阅读全文
posted @ 2012-02-28 09:12 Maxfong 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 比较简单的几种写法,有更好的方法请指点下。谢谢!第一种: 创建test.js文件:varvalue=0;functionsetValue(_value){value=_value;}functiongetValue(){returnvalue;}exports.setValue=setValue;exports.getValue=getValue;在app.js文件中使用:vartest=require('test');test.setValue(1);button1.addEventListener('click',function(e){alert(test 阅读全文
posted @ 2012-02-21 10:34 Maxfong 阅读(1233) 评论(1) 推荐(1) 编辑
摘要: 1.Ti试调创建Titanium mobile project(iphone版),并启动运行2.Xcode试调进入/Users/USERNAME/Documents/Titanium Studio Workspace/test/build/iphone/文件夹,打开test.xcodeproj,只用Xcode编译运行!直到运行编译完成!!可以使用真机调试:Xcode免证书开发调试3.得到app文件注意:/Users/USERNAME/Documents/Titanium Studio Workspace/test/build/iphone/build/Debug-iphonesimulator 阅读全文
posted @ 2012-02-19 12:49 Maxfong 阅读(1475) 评论(3) 推荐(2) 编辑
摘要: 将需要执行的SQL语句保存为read.sql文件并另存为ANSI编码。使用CMD执行.read命令 如果select出乱码,请更换查询器。SQLiteSpy还不错! 阅读全文
posted @ 2012-02-16 14:53 Maxfong 阅读(764) 评论(0) 推荐(0) 编辑
摘要: 编码问题,我的原因是Resources文件夹中添加了一张以中文命名的PNG。重命名后就好了!Rename your file or image!! 阅读全文
posted @ 2012-02-16 14:47 Maxfong 阅读(8699) 评论(0) 推荐(0) 编辑
摘要: 转自:http://ti.herxun.co/?page_id=440 轻松制作 App 再也不是梦! Titanium Mobile 让你能够使用你所熟悉的 web 技术,制作出如同使用Objective-C 或 Java 写出的 Native App。 除了有多达三百种的 API 可供使用,线上的使用者社群和 Titanium Taiwan User Group 所定期举办的聚会,你不只能够做出梦想中的 App,甚至可以让你的 App有更多的可能! 真正的原生应用程式 Titanium Mobile 提供给你原生的使用者介面,因此,无论是在 iOS 或是 Android上,... 阅读全文
posted @ 2011-12-14 14:24 Maxfong 阅读(5297) 评论(3) 推荐(0) 编辑