Tag: titanium

npm将web3安装到Appcelerator Titanium SDK> 6.x中

我想将web3安装到我的移动应用程序项目中。 不过,我在访问时遇到了一些问题,而没有一个红色的屏幕显示我无法访问这些文件。 我试图手动更新path等。 我所做的是在我的App文件夹中: npm install web3 然后,我看到我的App目录中的node_modules文件夹…但是,我不能要求在我的index.js文件模块与一个简单的: var Web3 = require('web3'); // throws error var web3 = new Web3(); function doClick(e) { var version = web3.version.api; $.label.text = "Web3 version: " + version; } $.index.open(); 现在我已经将node_modules的文件夹粘贴到了我在App文件夹下创build的lib文件夹中,并尝试访问其中的dist来访问web3.min ,然后尝试了很多其他的东西,没有运气…有人否则有这样的问题或有解决办法?

socket.io连接的多个握手

我正在写一个移动应用程序的服务器,并select使用socket.io从服务器到应用程序的推送通知,但我无法设置socket.io 目前在io.connect(服务器:端口)上启动了无数的握手stream, debug – client authorized info – handshake authorized HXtC1UPzcsEzO8X7x2B1 debug – client authorized info – handshake authorized aE7hMGDpp5InO1UWx2B2 debug – client authorized info – handshake authorized GBx_3n-8Lvbuo4QJx2B3 debug – client authorized info – handshake authorized tOEl0F5wNlh4xkn1x2B4 debug – client authorized info – handshake authorized K55Oit22yN9JDWxhx2B5 debug – client authorized … 我正在使用socket.iotitanium的应用程序的客户端,我不知道是哪一端导致此连接问题。 客户: var […]

使用JavaScript来处理由ColdFusion 9序列化的查询数据整齐地?

ColdFusion的serializeJSON函数像这样发送一个string: {"COLUMNS":["COURSE","CONTID","CODE"],"DATA":[["Texting 101",41867,"T043"]]} 如何整齐地使用JavaScript访问数据? var response = JSON.parse(this.responseText); console.log(response["CODE"]); // this doesn't work of course, but is there any way? console.log(response.DATA[0][1]) // this works but it's not readable 是否可以使用列名称而不是arrays位置访问JSON数据? 这是titanium工作室,所以我有访问节点(如果这有助于我的原因)。

在Titanium应用程序中使用node.js模块?

目前我正在编写一个小型的titaniumtesting应用程序。 我需要包含一个从NPM到titanium的模块。 在这种情况下,我正在尝试与https://github.com/oortcloud/node-ddp-client 我有错误说titanium不能find模块。 我用于包含的代码是 var DDPClient = require("./lib/node_modules/ddp"); 我可以在Titanium中使用node.js模块吗? 谢谢

在titanium的接触者ios中实现otr.js?

我正在尝试使用iOS的Titanium appcelerator创build聊天应用程序。 为此,我在我的节点js应用程序中实现了OTR.JS。 这工作得很好,但是现在我想在Titce Appcelator中实现OTR.JS。 我在Titanium Appcelator中search模块来为我的应用程序实现OTR。 但是我找不到任何解决办法。 所以任何人都可以澄清我,在我的titaniumAppcelator应用程序中使用OTR.JS。 如果有任何例子,请给我build议。

安装titaniumACS

我们试图通过命令行安装Titanium ACS sudo npm -g install acs 但是它保持失败,我们得到下面的错误 npm http GET https://registry.npmjs.org/bindings > bson@0.0.4 install /usr/local/lib/node_modules/acs/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson > node install.js sh: node: command not found npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/acs/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/WebSocketMain.swf' npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm […]

在javascript中链接asynchronous调用的正确方法是什么?

我试图find最好的方式来创buildasynchronous调用时,每个电话取决于先前的电话已完成。 目前我通过recursion调用定义的过程函数来链接方法,如下所示。 这是我目前正在做的。 var syncProduct = (function() { var done, log; var IN_CAT = 1, IN_TITLES = 2, IN_BINS = 3; var state = IN_CAT; var processNext = function(data) { switch(state) { case IN_CAT: SVC.sendJsonRequest(url("/api/lineplan/categories"), processNext); state = IN_TITLES; break; case IN_TITLES: log((data ? data.length : "No") + " categories retrieved!"); SVC.sendJsonRequest(url("/api/lineplan/titles"), processNext); state = […]