Community Questions & Answers
How can I search by a name?
I'm trying to get all videos from a youtuber channel and search for name of description I already get all the videos and stuffs with an URL to YouTube API but my question is... how can I search the description off all videos to match with a name that...
Problem to remove labels from an array who become a big allocation problem
Hi everyone, I am having some troubles with some allocations who keep growing with some labels inside an array. I use this array to feed a tableView. After closing I can remove all the tableviewRow from the memory but the labels keeps living. I tried to...
Parse and xml to an array
Hey people! I need some help. I must parse an online XML document and put the elements of each item in an array. I'm trying to do it but when i do `data.length();` it is 0. ~~~ function parsear() { var data = []; var xhr =...
Sort arrays on Android
Hey i am trying to sort an array on android (on ios it works like a charm) Example: ~~~ var ar = [1,3,7,3,5,7,3,24]; ar = ar.sort(sortafterDistance); Ti.API.info( ar ); function sortafterDistance(a, b) { return a.distance -...
Getting A List Of Unique Values From An Array
Hi, I have a database with a field which can contain multiple values separated by a semi-colon. What I'm trying to do is to list the unique values which will then be clicked to get values from another field in the respective row, thus listing all rows...
Store Array with Local Notifications in APP
Dear Appcelerator people, Is there a way to store an array with local notifications in the APP itself? So when im closing the APP completely and reopening it i still can detect the stored notifications? now i have this piece of code for global...
Showing large number of ImageView(s) in ScrollableView
Hi everyone, I need to make something like iOS default Photo app and I need to put a large number of photos to be shown in a ScrollableView. The problem is I need to store those images in array to be used by ScrollableView and the user may have few...
Exception thrown after upgrade to 3.1.0GA
Since upgrading to 3.1.0GA, my app is now throwing an exception that studio is not catching with a line number to indicate where the error is occurring. All I see in the Studio console now is what looks to be an simulator error message that tells me little...
How to read Audio/Video file and transform to text/wordarray for Encryption?
Titanium: 3.0 HTML5 I am currently using sjcl (http://crypto.stanford.edu/sjcl/) to encrypt/decrypt html5 content used on an iOS app. I am embedding source images and encrypting the text content of the html and then decrypting in the app to display,...
How to update the value in global variable?
I'm developing a pie chart in html while it is loaded from a JavaScript file which has the global variable. I want to know how to update the value in the global variable. Please help me, I'm still new. ~~~ var lost=['50','60','100','40','20']; var win =...
How to delete an array of Annotations
Hi, I'm having lots of trouble removing an array of annotations on my mapview. I already asked about it in this [thread](http://developer.appcelerator.com/question/146709/fetching-annotation-data-from-sqlite-database) earlier today, but decided to start a...
Imageview setImages(array) with filesystem not working
Hi, I tried creating an animated imageview by using the kitchensink code, which works fine in alloy, however it doesn't work with the filesystem for me. Anyone know a solution to this? Kitchensink code ~~~ var images = []; for (var i=1;i<18;i++)...
Increment MP3 Array on Click
I have an array of MP3s: ~~~ var wordSoundArray =...
Custom Object Array converting to String
In My Apps on Appcelerator portal of ACS, I created a Custom Object, with properties, the value of the property is something like: `[ { 'name': 'somename', 'perc': 60 }, { 'name': 'othername', 'perc': 35 } ]` When I save the object, it converts the JSON...
Fetch a specific array information in .JSON in Titanium Mobile SDK?
How to fetch the information of one array only instead of all from json url in Titanium Mobile SDK? Here is my code in app.js ~~~ var url = "http://dashberry.com/mspikes/json/mainmenu.json"; var table = Ti.UI.createTableView(); var tableData =...
How to fetch a data from .json url in Titanium Mobile SDK?
Can anyone help to fetch data from .json file and view it? (Please bear with me because I'm very new to this platform) ~~~ var url = 'http://dashberry.com/mspikes/json/mainmenu.json'; function menu2() { var win = Ti.UI.createWindow(); var xhr =...
Suds not recognizing array in request.
I'm not sure what i'm doing wrong here but when I try to use an array in my call parameters the xml is built for my request gets all wonky. Is my javascript object incorrect? Here is the XML I...
object has no method push
Hey guys, I am trying to add data in my array but not to succeed in it. ~~~ var cart_arr = []; function doTableClick(e) { if (e.source.id === 'productAddToCart') { if(cart_arr.length == 0) cart_arr = { product_id:args.productId , quantity: quantity...
Array.shift() does not remove first element
Hi, I am having trouble with the standart Javascript array functions. Below is my setup; * Titanium SDK 3.0.2.GA * Platform iOS 6.1, Simulator I am passing an array along with the construction parameters to a view like below; ~~~ var bgColors = [...
Database or array - what gives best performance
I have a performance question. I'm downloading information from a database, basically a phone book. About 1300 persons with about 10 properties such as phone, email, department etc etc. Total size 120-180 kB. Should I put this data in an internal...
add an EventListener to an array of buttons
Hi guys, I've got a rather silly problem but somehow I can't seem to get it working. Basically I just create an array of buttons. All these buttons need to open op a new window when clicked. I've added a simple eventlistener to see if it's working, but...
Alloy - un-executed function
Hi everyone, I started using Titanium a week ago, and I have a problem with my first try ! I created an alloy project. The goal is only to print a table with the result of an sql request. The problem is that I don't know if my js function is ok, because...
RUNTIME ARRAY
Hi Everyone...!!! I have a small scenario and I'm struggling a lot with it as I'm new to titanium.. I have got a textfield and I want to store its value on button's click everytime in an array and that to into the system memory using the...
TableViewRow Swipe -> How do I obtain the title inserted via the tableData array?
I appreciate any help possible. I've never had much way with understanding how to 'traverse' (correct term?) to obtain certain values. I ALL CAPS'd down in the code section where my problem is... I can't figure out how to get the value where that bold...
array addeventlistener
Hi, folks I want to add eventlistener to array.but I write this code.it cannot work? ~~~ var content=[]; for (var i=0; i<7; i++) content[i]=Ti.UI.createView({ //some code }); content[1].addEventlistener('click',function(){ alert(i); //or open...
Array Events
Hi folks,I m using Ti 3.0 and developing ios 6 and I want to add event listener my array.I m newbie I tried many way.where I add event listener? ~~~ menucontent[0].addEventListener('click,function(e){ //some...
Passing javascript array to php web service
As part of my app, there is a database of questions that users can answer. In order to do so, when they save an answer to a set of questions, these questions and answers get sent to the web service as arrays. How can I use these sent arrays in the php...
Dynamic imageview problem
Hi Folks, I m using Ti 3.0 for ios6 and. I m trying to make dynamic imageview or label how can I make this . var dinamik=new Array(); for( var i=0; i<10; i++){ dinamik[i]=Ti.UI.createImageView({ ...
How to change image with animaton?
Hey everyone! So... I'm trying to do some visual effect when I touch an button... my button is a view( Ti.UI.createView ) and I want to change his image with animation... I want to run over an array of images when the button is pressed and display all...
How to get the number of files in a remote directory (without server-side scripts)
Hi! I'm wondering if anyone knows whether it's possible to retrieve and store all the URLs of the files in a remote directory (i.e. not on device) in an array, or otherwise how to get the number of files in that directory. The thing is that I have a...
Javascript Arrays
Application type: mobile Titanium SDK: 3.0.0 GA Platform & version: iOS, Android Device: iOS simulator, Host Operating System: OSX Lion Titanium Studio: Titanium Studio, build: 3.0.1.201212181159 Hi hope someone can help me_ I am trying to create a...
Class constructor and methods with Array Stack of Array Objects
Application type: mobile Titanium SDK: 3.0.0 GA Platform & version: iOS, Android Device: iOS simulator, Host Operating System: OSX Lion Titanium Studio: Titanium Studio, build: 3.0.1.201212181159 Hello, I've had a good look around and can't find an...
getting data from one array to the another array
I need to take the data from the dataArray and get it in the resultArray using the filter StateName dataArray has all the correct data in it just not pushing anything to the resultArray ~~~ var sendit = Ti.Network.createHTTPClient(); sendit.open('GET',...
Best way to convert a ResultSet to an Array
Greetings, I am developing for Android. My app uses a database, and of course I query it to get resultsets. At the moment, I convert the resultset to an array which is returned from the database accessor function and this is working fine in...
Declare Global Variable and Array
How to declare the Global Variable and Global Array in Titanium mobile ? Thanks
Populating picker data -- SCRIPT ERROR index 0 beyond bounds for empty array
Getting an error for [ERROR] Script Error = *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array at group-select-first.js (line 32). Trying to resolve this but getting nowhere. Type: mobile TSDK: 2.1.4.GA Platform: IOS SDK 6.0 Device...
Populating OptionDialog option values from sql select results
I am trying to populate an OptionDialog with options selected from a database table. But it isn't working out for me and I wonder if anyone can see what is wrong with my code please? This is the main method that I am calling the OptionDialog...
Print array element in a tableViewrow
how i will create a table view row from a given array of without loosing the previous element of array.. array is user given.it is not an global array.. I have done something like this.. //FirstView Component Constructor function FirstView() { var self =...
Array not returned properly
I am returning the array using a function in titanium.There are two entries in my array which are showing alert but when i access the returned value in another js file.It only show one value in alert Here is my code (it is in db.js): ~~~ function quizfun()...
object Array's contain a "unique" object Function
A "unique" object Function is now appearing in the majority of my object Arrays. Trying to work out why all of sudden this is occurring but can't find a thing. I'm using Titanium SDK 3.0.0.GA, I've tried rolling back to 2.1.4.GA but the problem...
Android App - Style an array
Application type: mobile Titanium SDK: 2.1.4.GA Platform & version: Android 2.x Device: Android Samsung Galaxy S3 Host Operating System: Windows 7 Titanium Studio: Titanium Studio, build: 2.1.2.201208301612 (c) Copyright 2012 by Appcelerator, Inc....
Android App - Uncaught Error: Index -1
Application type: mobile Titanium SDK: 2.1.4.GA Platform & version: Android 2.x Device: Android Samsung Galaxy S3 Host Operating System: Windows 7 Titanium Studio: Titanium Studio, build: 2.1.2.201208301612 (c) Copyright 2012 by Appcelerator, Inc....
Android App - Get my array to show
Application type: mobile Titanium SDK: 2.1.4.GA Platform & version: Android 2.x Device: Android Samsung Galaxy S3 Host Operating System: Windows 7 Titanium Studio: Titanium Studio, build: 2.1.2.201208301612 (c) Copyright 2012 by Appcelerator, Inc....
remove duplicate years from array
I have an array with duplicate years in it. example 1997 1998 1998 1999 2000 2001 2001 2002 I would like to create a new array with out the duplicates. Is this possible?
TiBlob to Byte Array
I have seen this question asked a few times, but no definite answer. I am attempting to send an image to a MS (Soap) Web Service, and the service requires files to be sent as byte arrays. Is there a way to convert TiBlobs to byte arrays? [Relevant Code...
Hot to get data with JSON from PHP. Not Working!
Hi guys, I'm trying to get a simple array of data from php on my application with JSON, but it is not working. I don't know what I'm doing wrong. This is my app code: ~~~ var winMain = Titanium.UI.createWindow({ title: 'Test Database...
Android crash error
Hi, Some user is experience this crash: --- java.lang.IndexOutOfBoundsException: Invalid index 1, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) at java.util.ArrayList.get(ArrayList.java:304) at...
How to add an animation to items in an array?
I want to add an animation to the views stored in an array. But when I try I don't get any result. And want to move them to the left when I push a button in the view. For some reason it doesn't work if I change the 'left' property of 'win2'. Also...
Add information with style to an array
Hi, I want it to looks like this: http://i47.tinypic.com/sf9w1h.png For know i only get the title in the middle after i have clicked on one line of text in the array and i can't go back either without the app closing. I wonder how i attach text and...
commonJS & Global Variable Arrays module
Don't know how i can save a array instead of variables in commonJS module as described here: [commonJS & Global Variable](http://www.thewarpedcoder.net/2011/12/apccelrator-titanium-commonjs-global-variables) I tried the following code, but it doesn't...