I have four chapters in a child book. Chapter A,B,C,D. The user can change
the playing order in the chapters by writing numbers in 4 fields:
To check the numbers in the four fields I wrote this script that i put on a
check button
-----------------
on mouseUp me
case (the text of field 1) of:
1:member("answer").char[1] = "A"
2:member("answer").char[2] = "A"
3:member("answer").char[3] = "A"
4:member("answer").char[4] = "A"
end case
case (the text of field 2) of:
1:member("answer").char[1] = "B"
2:member("answer").char[2] = "B"
3:member("answer").char[3] = "B"
4:member("answer").char[4] = "B"
end case
case (the text of field 3) of:
1:member("answer").char[1] = "C"
2:member("answer").char[2] = "C"
3:member("answer").char[3] = "C"
4:member("answer").char[4] = "C"
end case
case (the text of field 4) of:
1:member("answer").char[1] = "D"
2:member("answer").char[2] = "D"
3:member("answer").char[3] = "D"
4:member("answer").char[4] = "D"
end case
end
----------
The result I get in my "answer" member ...
Now to the problem... the scritpt works perfectly but if I have say 15
chapters there will be 15 case of scripts and 15 alternatives too..
Is there away to do the same with less code?
/Mattias
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]