Community Questions & Answers
iOS project devoid of logic
I am working on an app which will be released for Android and iOS. So far the development for Android is going great but the iOS version is plagued by illogical errors. First off I am using Alloy with version 3.0.1.201212181159 of Titanium Studio. I am...
remove multible years from array
Hi I am creating an array with 10 other arrays using concat. The array is a list of different years. The multiple arrays is creating multiple years for example 2 1998's. How do I only display 1 of each year in my table view. Here is a...
Arrays on Android Module
Am a bit confuse with the Android Module Development. I guess the guide for develop iOS modules is very well documented, but not for Android. Am trying to pass an array property from my app,js to a ViewProxy. So in my JS I got something like ~~~ var foo =...
Can't add event listener to image in array
I have an 2d array of images that I made below: ~~~ var sprite = new Array(6); for(var i = 0; i < 10; i++) sprite[i] = new Array(8); ~~~ Then in a method I instantiate them with various images in a grid fashion. ~~~ for(var yPosition = 0, a = 0,...
Adding Labels to the View - Dynamic Positioning
Hi On my iPhone App i am struggling to add labels to a view that don't overlap eachother and all have different top position values I am able to loop through my Items stored in an Array and create a label for each but the labels all have the same...
Get orginal data from tableview and combine it with new data
Hi all, I was wondering, is it possible to get the original data from a tableview and combine it with new a dataset? ` for (c = 0;c < itemList.length;c++){ row =...
Simple array question
Does standard JS array syntax not work in Titanium? The reason I ask is I'm doing a simple bit of code as follows but it fails with "Constructor for "String" not found" ~~~ var myArray = []; myArray[0] = "hello"; ~~~ Thanks.
Clear Array on another window
Is it possible to clear an array of tabledata that is set in another tab/window and rebuild that table. I have a tabbed application with 2 tabs. The first tab displaying a list of items that drill down to a sub window which shows the information and a...
Ti.API.info(array) causing crash
Hi Am I just missing something or what, but when I try to print out the value of an array out to the debug console the app crashes? Here is the code: ~~~ var myArr = []; myArr = Ti.App.Properties.getList('myArr'); // At this point I can see my objects...
Pass two o more arrays in event listener
This example has one array, but how i can send two or more arrays? Try this.. In list.js: Titanium.UI.currentWindow.addEventListener('send_data', myDataFunction); function myDataFunction(e) { Titanium.API.info("Data: " + e.dataArr); }; In...
How can i reintialize Array ?
Hello, please see my code, ~~~ var arr=[]; arr.push({ title:'item1', r_id:'item2' }); ~~~ but now i want to use again this again if i push then its meaning data will be enter after arr[0], but now i want to push from zero index again, so...
Passing arrays of data into webviews
I'm trying to send data to a webview in order to use it with RGraph. I can send a single variable but I've been struggling to send larger arrays. *app.js* ~~~ //This works.. Ti.App.fireEvent("TestFiring", { data:'Caspar' }); //This...
Append the value of a clicked row into an array?
How do you append the value of the clicked rows into myArray? For example when a row is clicked/checked it will add the value into the array and if clicked on again/unchecked then its gets removed from the array. Here is my code so far ~~~ var win =...
receive and display array multidimensional
Good nite, I'm tring to receive some data in a multidimensional array, and put it int a table view. here is the php code in the host: http://pastie.org/1542148 and here is my js app code: https://gist.github.com/817096 I think the problem is in the app...
Appending data to an Array set with Titanium.App.Properties.setList('appwindows', appwindows);
I need some help; I am trying to append data to an empty array that has been set with Ti.App.Properties.setList. in app.js I have the following lines: ~~~ var appwindows = []; Titanium.App.Properties.setList('appwindows',...
Global Arrays of Objects
I'm trying to pass an array of objects, so: I would like something like: ~~~ Ti.App.friends[8342873] = { name: "Mike", age: 26, height: 6.1 } ~~~ But when I call: ~~~ Ti.App.friends[dynamic.id].name ~~~ I get an error friends...
Global Arrays of Objects
I'm trying to pass an array of objects, so: I would like something like: ~~~ Ti.App.friends[8342873] = { name: "Mike", age: 26, height: 6.1 } ~~~ But when I call: Ti.App.friends[dynamic.id].name I get an error friends [undefined]. Any...
Global Arrays of Objects
I'm trying to pass an array of objects, so: I would like something like: ~~~ Ti.App.friends[8342873] = { name: "Mike", age: 26, height: 6.1 } ~~~ But when I call: Ti.App.friends[dynamic.id].name I get an error friends [undefined]. Any...
Global Arrays
Thanks for the great answers here... I have a similar project, except that I'm trying to pass an array of objects, so: I would like something like: ~~~ Ti.App.friends[8342873] = { name: "Mike", age: 26, height: 6.1 } ~~~ But when I...
Global Arrays
Thanks for the great answers here... I have a similar project, except that I'm trying to pass an array of objects, so: I would like something like: ~~~ Ti.App.friends[8342873] = { name: "Mike", age: 26, height: 6.1 } ~~~ But when I...
JSON.parse on arrays
hello, does JSON.parse() support multi-dimensional objects? i can't get it to work, however, 1-dimensional structures are ok. any idea? thx, uno
Passing Arrays throughout windows
Hi, I am trying to pass an array to a new window which I "outsourced" in its own .js file. This does not seem to work for me. I can pass single variables without a problem, but no arrays. This is how I am trying to do this: app.js: ~~~ var...
Nested arrays
i Think there is a problem with nested arrays. Im using the following code, and im getting this red screen error on the iPhones simulator: ~~~ for(var i=0; i<=tagList.length; i++){ for(var j=0; j<=tagList[i].length; j++){ var text =...
Showing 1-23 of 23