Community Questions & Answers

Button Event

if i make a loop to create group of buttons like that:- `for(var i=0;i<5;i++){ var button = Titanium.UI.createButton({ ..... }) } ` I want to know each button the user clicked ,but after creating the...

Scrollable View Loop

Hi, I'm trying to get a scrollableview to "start over" when the last image is reached, so it seems like it has no end at all. Like this: 1-2-3-4-1-2-... And also the other way around: 1-4-3-2-1-4-3-... Is this possible? I guess it can be done...

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

YQL/XHR in the loop - how to make it work?

I need to go through a list of urls, and parse them with YQL. The obvious way - for loop with YQL query within - would not work, because YQL is asynchronous. Is there any other way to do it?

loop w/ array

Hello, I have this ~~~ var obtenerCategoria = Ti.Network.createHTTPClient({ onload : function(e) { var viewCategoria = []; var c = 0; var colores = 111111; var obtenerCategoriasData = JSON.parse(this.responseText); var...

add views in a tile like manner

I am wanting to create views in a loop and I want the views to be different sizes dependent on the content. I thought I had it cracked with this code: ~~~~ var win = Ti.UI.createWindow({ layout : 'vertical', backgroundColor:'#D9D9D9' ...

Multiple calls of service in a lopp

Hello Friends, Its very important, I stuck in service call in loop. For my app i need to call image upload service multiple time in a loop. I need to display these images on each row and row is populated from service call. following is the code ~~~ var...

Looping vibration

Is there anyway to loop vibration ? I looked around API doc but could not find it. Then I tried to make a looping logic as below. But it did not work and ended up with infinite loop.... I would appreciate your advice on how to enable loop...

looping value error

Hello, I am using the below code to loop values var cellWidth = 145, cellHeight = 240, xSpacer = 5, ySpacer = 7, xGrid = 2, yGrid =20, tableData = [], cellIndex = 0; var vlu; vlu =20; for(var y = 0; y <= yGrid; y++) { var row =...

fireEvent not catched in time

Hi, I have a problem with fireEvent. I have to display a progress bar that is animated by events that are called in a loop. Note that the loop that call fireEvent is in a different JS file, not on a same windows. The problem is that the first 2 or 3 events...

Unable to get array value using for loop

titanium mobile sdk 2.0.1. iphone sdk 5.1 Hi, This is the structure of my array named `ansArray` ~~~ ( { answer = c; question=1; }, { answer =d; question=2; } //...... //....... ) ~~~ I wanted to separate each values from the two...

Parsing an array into a variable

Hello guys, I've got a list of names that are returned from a database, and pushed to a TableView. I would like to grab them again (using the 'babyname' variable) and pop them into a single variable so I can write out my list so it can be emailed. It...

Loop and eventListener

Hi, I have a loop which create 4 buttons, each buttons has a specific action : ~~~ for (var i=0, i<4, i++) { var btn = Ti.UI.createButton({ ... }); btn.addEventListener('click',function(e){ alert(i); }); } ~~~ But if i click on btn 1, 2, 3 or 4....

Titanium Studio CSS Format Error

I am using Titanium Studio on a Linux Ubuntu 11.10 Oneric. I am getting errors when I try to resolve a problem marked on the editor. The screen on the editor goes blank and you can only see the syntax by highlighting it. After a while editor will stop...

Looping through XML

I am building a 3 level deep table group. It is going to be populated through XML which I am loading with the method below. The issue is starting at the second level. The first level shows up fine, 4 rows. Clicking on any of them results in displaying...

Custom integer picker

How would I create a picker for iOS that has 3 columns 1-9 integers in each column, and they would need to infinitely loop around like a date/time picker? I can figure out how to manually add each column with custom set data for each column, but they do...

Animation loop

Hi all! ======== I'm a newbie at programming and Titanium Mobile to. as I'm writing this, I'm working on my graduation project as a multimedia designer in Copenhagen, Denmark. My project is about mobile app's and i would really like you to help me. I have...

What a c$&p SDK...

So guys, just becoz i'm really disperate, i'm making an android and ios app and unfortunally i've decided to use titanium, the thing is that really it has a poor documentation and LOTS of bugs. Now i came across another problem(beside the one with the...

Nested XML Node issue

Hi All, I have a nested XML structure as follows: ~~~ <bookstore> <book> <title>Title 1</title> <year>2003</year> <author id="1">James McGovern</author> <author id="2">Per...

Stuck in a loop?

I have already done this process on 3 other views in my application, and all worked fine. However, this time the "while" loop seems to be stuck and repeats until I kill the simulator and I don't get why: [Here is](http://pastie.org/2491587)...

Make a sleep function

Hi, i want to make a sleep function in a loop. I want a function wich sleep the app when i send some data on a remote server. I have a loop, i send files one by one but with the loop they were all sended at the same time and it's not what i want. How can...

Access Loop Number within Function

Hi Folks, So... Im trying to access the loop number (i) within my event listener! promoURL is an array. Alert below works fine. It outputs the whole array. But if i try and do promoURL[i] it refuses to work! promoURL[1], promo[2] work fine.. Sooo, how can...

Image Loop

Hi Folks, Im trying to figure out why this image loop wont work! Ti.API.info outputs thumb, but the image loop just donsent work! Nothing is output to the screen :( (Im using a static image just to test it!...

Showing 1-50 of 76 1 2