After mobilePick, script may or may not continue.
Roger Eller
roger.e.eller at sealedair.com
Mon Oct 14 14:05:46 EDT 2013
I am still having a problem with getting subsequent mobilePick to work. I
tried moving my cases into a separate handler or function. If the script
is in a separate hidden button, I can make it work, but I don't want the
extra button(s).
*Goal:* Present a pick list, followed by another pick list based on the
context of the first.
Any ideas?
~Roger
On Sun, Oct 13, 2013 at 8:21 PM, Roger Eller wrote:
> 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