I must be missing something here. I've created counter after counter and they all work, but in this code below the counter i always stays at zero. The mapDelays count correctly shows 18. The idea is that it compares the array value at i against true or false. This is called from another method that plots pins from an airports array (18 airports). One of the items in the array is the 'delay' either true or false. So as I plot the airports I want to see if there is a relay 'true' and if there is, make the pin red instead of green. Yes, I'm a newbie so any pointers would help - specifically, flow and logic I'm obviously missing!

3 Answers
3

After I change code format I find that at the first for loop of i you have return view; This will stop your for loop. So you have the zero. Next time you should be careful about your coding style. Especially for {}

I originally had the return view outside and put it there to test if this had any effect? I still go the same result, zero.
–
ZDigitalProNov 18 '12 at 14:32

Check carefully your code and update your question. So that we can help you more.
–
sunkehappyNov 18 '12 at 14:35

Yep, misplaced the {}, changed it and all works as it should, counting, counting counting!!! Thanks so much for catching that. Sometimes you look at something so much, you miss it!!
–
ZDigitalProNov 18 '12 at 15:15

How would I code this to get it to loop correctly?
–
ZDigitalProNov 18 '12 at 14:34

It's hard to say without seeing the program logic but it sounds as if the calling method, that you say plots pins, is the one that needs to have the for-loop since it wants a view for each airport. The caller would then pass an i value that matched the airport to the logic of the method you posted. (Maybe...I'm guessing based on incomplete information!)
–
Phillip MillsNov 18 '12 at 14:44

Ok, I will try that out. I understand what you are saying. Thanks for taking the time to respond, I do appreciate it!
–
ZDigitalProNov 18 '12 at 14:57