Community Questions & Answers

module.exports returns uri & id

I am trying to export an object that looks like: ~~~ // letters.js module.exports = { a: "A", b: "B", c: "C" }; ~~~ ~~~ //app.js var letters = require("letters"); for (var i in letters) { ...

i18n arrays (w. objects) - How to?

I want to internationalize my app and it works fine with i18n until i try to use arrays (with or without objects) -------- I need to get the length from the array, but its always undefined. -------- Where am I wrong? -------- ### in i18n...

How to define labels as a class?

Hi, fairly new to javascript and Titanium. My project display many labels and text fields where the user can enter data and update it. The issue I'm having is that I have an Edit button which when pressed, allows the user to edit the text field, and when...

CommonJS Objects Problems

Ti SDK 3.2.2.GA CLI 3.2.3 IOS SDK: 7.1 IOS simulator 3.5 Im starting developer with Alloy and CommonJS, and I have a problem with the scope of the objects: ~~~ //median.js function...

Update object titanium

Hi, Im having problems by modifying an object in titanium. My code: ~~~ Ti.API.info("before: "+JSON.stringify(myObject.oneProp.state)); myObject.oneProp.state = "off"; Ti.API.info("after:...

Any way to list flies in a directory?

Hi i would like to be able to dump a lot of images in a directory and have some code that scans the directory and lists all the filenames found putting them into an object i can use later. Thanks in advance

How to access Javascript Object

Sorry, if my terminology if off here. I want to pass " lbl_input.value" to another page. I can click done and it will alert the value, but I want to use it over and over for calculations in the window1.js and use it. test,js ~~~ module.exports...

Android array object bug

Hello everybody, i have code perfectly working on ios (you can see letters and do event with) but bugging on android (app closes when it arrives on the page.js with this code). The code is something to this: `inline code` ~~~ var containerT =...

Cannot found reviews object in json

I made ??one places the object, and reviewed it, but when I call places/query.json, I do not see the "reviews: Reviews []" in json that, although appears reviews_count, ratings_average, ratings_summary, I use Application type: mobile, android,...

Global Cart Object

Hello my friends, I have a question regarding a global shopping cart object. I understand that global variables do not exist in Titanium but I'm wondering what the best solution for creating a global shopping cart is. The cart will be accessed in different...

Object property issue cyrillic

Hi, i have a strange issue... I have an object with properties stored in cyrillic. I i look in debugger inside object property, the value is good, but if i look like object.property - value is cutted... I really confused why here is the screenshot...

Global object

My intern developed an Titanium Android App and created an global object within the Ti.App namespace like this: Ti.App.ObjectName.function This seemed to work in Android but on iOS it doesn't work when called from a different Window, the...

Problem to sort a JSON with a specific value

Hi everyone, I am having a big trouble with some data to sort a JSON object with all the nodes whose got the value that I want. I am retrieving my complete JSON , no problem for that. But when I am trying to sort it to get a smaller one with a function. I...

Crazy behaviour of objects

Hello, this code in commonJS module I cannot understand: ~~~ var answer = { state : true, }; var self = Ti.UI.createView({ backgroundColor : 'white', answer : answer }); console.log(self.answer.state); self.answer.state =...

Titanium.UI.iPhone unknown

I have the following piece of code: ~~~ tabGroup.open({ transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT } ); ~~~ But for some reason, it doesn't know Titanium.UI.iPhone :S : Result of expression 'Titanium.UI.iPhone' [undefined] is nog an...

ACS

I've tried the Following and it works as expected: ~~~ Cloud.Objects.query({ classname: ' ... ', page: 1, where: { user_id: .... }, per_page: 10 }, function (e) { } ); ~~~ Though in reality,...

[object Object] is not a constructor

Hi, new to the titanium platform and just getting started but ran into a issue implementing a picture gallery module from here: https://github.com/novelys/titanium-picture-gallery So this was working originally: ~~~ function ApplicationTabGroup()...

Any way to clone an object?

I have an array of Titanium.UI.WebView objects. I want to add them to a view and show that in the current window - this is working fine. The problem is if I remove the container view and try to recreate it later using the original WebView array I get...

Documentation error

As I've tried to delete a custom object from my HTML project, I had to find out that the documentation at [http://cloud.appcelerator.com/docs/api/v1/custom_objects/delete](http://cloud.appcelerator.com/docs/api/v1/custom_objects/delete) is wrong. As stated...

diff two arrays of objects

I'm googeling and working for days on that problem, and I don't have any solution yet. I want to diff two arrays of 1-level objects. I want to compare each field of every object. On difference push it to a result array. Maybe the community has an answer...

Question about calling an instance/object

titanium sdk 1.8.2 iphone sdk 4.3 Hi, If I call the function this way, via a click of a button: ~~~ addBtn.addEventListener('click', function(){ var addview = new AddView(); self.add(addview); }); ~~~ if I click the button again and again, does it...

How to change object's property

titanium mobile sdk 1.8.2 iphone sdk: 4.3 Hi, I added an object from FirstView.js like this: ~~~ var ListView = require('ui/ListPage'); var listview = new ListView(); self.add(listview); ~~~ this is what's inside the ListPage.js ~~~ function...

Showing 1-50 of 112 1 2 3