After mobilePick, script may or may not continue.

Roger Eller roger.e.eller at sealedair.com
Sun Oct 13 20:21:12 EDT 2013


 The script below always fires the first pick list.  What seems strange to
me is that after making this choice, the next pick list may or may not ever
happen.  Why?  Is is a bug, or should I be doing something differently
here?  Thanks in advance.

on touchEnd pid
   put "PRIMARY" & cr \
         & "SECONDARY" & cr \
         & "THIRD" & cr into tList0
   put lineoffset("SECONDARY", tList0) into tInitialIndex0
   mobilePick tList0, tInitialIndex0

   put the result into tChoice1 -- returns 1, 2 or 3

   switch tChoice1
   case 1
   put "X1" & cr \
         & "X2" & cr \
         & "X3" & cr \
         & "X4" & cr into tList1
   put lineoffset("X2", tList1) into tInitialIndex1
   mobilePick tList1, tInitialIndex1
   break

   case 2
   put "Y1" & cr \
         & "Y2" & cr \
         & "Y3" & cr \
         & "Y4" & cr into tList2
   put lineoffset("Y2", tList2) into tInitialIndex2
   mobilePick tList2, tInitialIndex2
   break

   case 3
   put "Z1" & cr \
         & "Z2" & cr \
         & "Z3" & cr \
         & "Z4" & cr into tList3
   put lineoffset("Z2", tList4) into tInitialIndex3
   mobilePick tList3, tInitialIndex3
   break
   end switch
   put the result into tChoice2 -- returns 1, 2, 3 or 4

   answer tChoice1 && tChoice2
end touchEnd

~Roger



More information about the use-livecode mailing list