Community Questions & Answers

Send JSON and parse in PHP

Hi ! I'm searching for days now and i can't find the mistake, i send my json : ~~~ var xhr = Ti.Network.createHTTPClient(); xhr.open("POST", "http://****.php"); xhr.setRequestHeader('Content-Type', 'application/json;...

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...

parsing date time string?

I'm attempting to parse a mysql datetime field output. So far my method below works, I think, in getting it into the JS date object, however when I attempt to use some of the Data data object methods it does not always return what is expected. ~~~ dates =...

Object´s global in Android

I´ve got this code in app.'s: ~~~ var CurrentPosicion = require('lib/CurrentPosicion'); var Data = require('lib/Data'); var myPosition = new CurrentPosicion(); var myData = new Data(); myData.getData(); ~~~ In CurrentPosicion.js i´ve got: ~~~ function...

create a button object

For some reason I'm struggling with kicking things into oop. I really want to work in a more object format than what I have used so far in the last week with Ti. So I created a very basic method to construct a rating view. Very basic, but every time I try...

isValidRow is NULL ?

~~~ // Setup Superglobal var HS = { dbCurrentVersion: Titanium.App.Properties.getInt('DBVER'), db: {} }; /* .... .... */ // Setup Database Shortcut: HS.db = Titanium.Database.open('main'); ~~~ Now I know that HS.db.execute works for me. If it...

Object and array console output

JS Objects and arrays are sometimes printed as: ~~~ Ljava.lang.Object;@48649540 ~~~ This output is totally useless from JS point of view. The workaround is to call "Ti.JSON.stringify" before dumping variable. Can this workaround be...

window in an object

i have a js file with the following: ~~~ exports.settings_window; exports.show = function(){ this.settings_window = Titanium.UI.createWindow({...}); ... var scrollView =...

Showing 1-50 of 93 1 2