Community Questions & Answers

Titanium.include not working?

Hello, A year ago i used titanium, since then never again. But now i wanted to start developing with Titanium again. But i encounterd my first problem. Ti.include() is not working. It always says can't find file. I searched for several options but none...

Ti.include on Android

Hey, just found 2 years old threats... Isn't it possible to use Ti.include with android? it seems just not to include the files correctly.... if i am testing on device or emu... Help would be great! SDK 3.0

Ti.include in Alloy

Is there a way to use Ti.include in Alloy inside a controller .js file to call code written in other files anywhere inside the app tree?? If there is please explain how can I do it since i tried ~~~ Ti.include('/src/myFolder/myFile.js') ~~~ and it did...

Include File In All Windows

In simplest form, I need to include the `Global.js` file in every other class. without having to place it in each class individually. So, the equivalent of doing this in every class in the entire application: `Ti.include('Global.js');`

Include Once or Import

Hello! Is there an import (C style) or include_once (PHP style) statement for mobile? I tend to use include files that appear to get 'included' more than once which presumably takes a performance hit. There doesn't appear to be one documented but I'd...

Choices on startup

Hopefully someone here can tell me what I'm doing wrong. I am trying to create a tabbed app that asks the user to choose the closest city to them on the first start up. I am using the default tab JS that appcelerator creates and including a file that...

include from worker

I'm creating a worker: ~~~ var worker = Titanium.Worker.createWorker("worker.js"); worker.start(); ~~~ And from worker.js I would like to include("ruby.rb") in order to run some ruby scripts. But all I get is: Error executing worker:...

Can't find files on iOS device

This function works fine on the iPad and ALL simulators. However, on iPhone it is unable to find the corresponding file. The OS is being returned as 'iphone', I've checked all spelling and file paths, I've cleaned the project more times than my own house,...

Missing files when running on iOS device

My project is running perfectly on iPad. But when I run on iPhone, it cannot find any of the files I specified. I have a function that checks the OS name. If it's an iPad, it imports a set of files. If it's an iPhone, it loads a different set of files. I...

Ti.include SDK 1.7.x

Did something change on the include function? With SDK 1.6.2 I could successfully include a file xyz.js located in Resources/android and Resource/iphone by the following statement: ~~~ Ti.include('xyz.js'); ~~~ Then, based on the used OS it was...

Problem with include and iPhone Simulator

I have the default app with two tabs. If I just copy all the code from this file to another js file and just add as an include in app.js, it will fail with this code ~~~ [ERROR] error loading path: file://localhost/.../TestTit.app/tab1.js, Error...

What's different with url and include

Hellow , I need to know what the different between using include and createWindow with url. 1. in app.js to using Ti.include('ui/HotNews.js') 2. in app.js to createWindow using url ~~~ var WinHotNews = Titanium.UI.createWindow({ title:'????', ...

Creating a Reusable Factory (and Reusing it)

I'm creating a factory that will generate a header for several windows in a client application, but something isn't right. The header shows up fine on my home screen, but on that screen I have a button that loads a new window. My `ui.js` file (the custom...

Showing 1-50 of 99 1 2