Community Questions & Answers

How to CommonJS Module

Hello, Simple question, How do I create a new mobile module project with the target being commonJS? Creating a module requires a single platform to deploy against, and commonjs is not an option. I know I can add files to the resources directory and use...

Getting Node.js PDFkit working

Hey all, this seems like a really great commonJS module. It works in the browser and in node.js. For open source, it is one of the only javascript based PDF generators to support SVG graphic formatting. http://pdfkit.org/ I took the web commonJS format...

Prepare commonjs files/modules for 64 bit?

Hi I have upgraded Titanium sdk to 3.5.0 GA as well as ios sdk (8.1) and xcode (6.1.1). Now, when deploying on device (iPhone 6 or Ipad) I get this error message "Script Error Couldn't find module: Data for architecture: x86_64" I bet it is...

Close modal window commonjs

I am not sure what I am doing wrong. I would like to close a modal window from a button. This is not the close button, this is a second button in a view. ~~~ callDibbsBtn.addEventListener('click', function(tabGroup) { var DetailsView =...

Correct way to require another file in titanium

Hi, I am developing an app for iOS and android. I am facing some problem with android as it keeps skipping frames after adding more pages and items. Lets say i have made a custom text field which consist of a view + imageview + textfield, I will need to...

Alloy exporting function problem

Hi Everyone, I am posting this question after spending (actually wasting ) two days of trying to solve the issue. I am making a chat application with XMPP. My problem is the UI(message box) is not created . I need to create this box for two occasions...

Commonjs Titanium Module

Hello, i'm trying to create a module with pure Js in titanium. when i compile without file in assets it's work but when i add my file your.module.id.js in asset directory a got an compilation error. I'm using 3.3.0 GA. Thanks advanced.

Return First Window

Hello, How can i return the first window from the last window while using the commonjs navigation window ? Thanks app.js ~~~ var StartUp = require('/control/startUp'); StartUp.StartApp(); ~~~ starUp.js ~~~ function StartApp() { 'use strict'; var...

Problems with the debugger

I am running Titanium SDK 3.3.0.GA and I am running Titanium Studio 3.3.0.201407100905. I have two problems with the debugger. 1) When the debugger hits my breakpoints with the iOS simulator it is not executing that line of code. It is off by a few...

web debug

I am building my app in commonjs way and when I tried to run my app in web browser. The debugger show me the error in index.html, is there a better way to debug my web app? Thanks!

Get a warning when I tried to use momentJs

This is the warning: [WARN] : Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info. I am using...

"exports" is not defined ? Android issue.

I am attempting to build a cross-platform utility app using the commonJS approach. I've had issues with SDK versions, and am currently using 1.80. Although everything is working fine on IoS, I'm having some major issues on Android and can't even use the...

Javascript - Garbage Collection

I'm a bit confused here: 1. Global variable will stay in memory even if it will not be used anymore? For example, in app.js: ~~~ var foo = Ti.UI.createView(); //something else. the foo will never be used again. ~~~ So the variable foo and the view it...

CommonJS module

In my module there is a function that needs to be exposed and used internally. Here is what I do: ~~~ var foo = function(){}; //to expose exports.foo = foo; //to use internally foo(); ~~~ or more simple: ~~~ //to expose exports.foo =...

Probably simple Q regarding commonjs

(Building for both Android and Iphone) Hi I am new to commonjs and this is my problem: On startup of my app, I check if I am connected to the net, if so I grab a fresh json file on a server and I set the fresh json (in "json.js"). In...

Showing 1-50 of 420 1 2 3 4 5 69