Can anyone explain me how to shorten the code I use?

Mark Smith mark at maseurope.net
Wed Mar 15 08:37:53 EST 2006


William, you can build the names of controls as you go, like so:


repeat with n = 1 to 25
   put "naam" & n into tFieldName
   put "naam" & n & "nivo" into tButtonName
   ...

end repeat

You get the idea,


best,

Mark


On 15 Mar 2006, at 12:51, William de Smet wrote:

> f the text of field "naam1" = empty and the selectedtext of button
> "naam1nivo" = "1"
>  then answer error "Naam van leerling 1 mag niet leeg zijn!"
>  if the text of field "naam1" = empty and the selectedtext of button
> "naam1nivo" = "2"




More information about the use-livecode mailing list