Jython/Python not recognizing for loop -


i found loop not being ran reason.

system.out.println("wann in createlabtranswithdistribution()")  twplset = wombo.getmboset("ext_taskwplaborview") twplcount = twplset.count() totalhrs = 0.0 system.out.printf("wann in createlabtranswithdist() right before loop. twplcount %d", twplcount)  in range(twplcount) :     system.out.println("wann in right after loop")     twpl = twplset.getmbo(i)     taskhrs = twpl.getfloat("taskhrs")     wohrs = twpl.getfloat("wohrs")     percenthrs = round ( ( hours * taskhrs *4 / wohrs ))     percenthrs = percenthrs / 4     totalhrs = totalhrs  + percenthrs     system.out.printf("wann in createdist(). percenthrs= %d", percenthrs)      if totalhrs > hours :           percenthrs = percenthrs - ( totalhrs - hours ) 

as can see i've added debug stuff. check , twplcount has data (9 exact) cannot inside loop. seems disregarding entire loop. suggestions helpful. new python/jython.

edit: after debugging got rid of range , did 'for in twplcount' , received error int object not iterable. hope helps whos trying help. thank you

is value of twplcount 0 chance?


Comments