I am using a graphic to allow users to click on different areas of the body to reference a location for clinical findings. I've created a transparent button over the parts of the body and I want to show or hide the label for that part of the body:
on mouseUp
if visible of field "rtarm" is "false" then
show field "rtram"
else
hide field "rtarm"
end if
end mouseUp
This is the simple script I use to show or hide the label when the user clicks on the transparent button. When I run it in the simulator it doesn't work for some reason. I'm sure it is simple logic that I'm not following.
Bert
something wrong with my button logic
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: something wrong with my button logic
Hi bdtrauma:
I tried your code but I noticed that the field name in the visible line is different than the field names in the subsequent lines and livecode comes back with chuck not found. Try this code... It works under the simulator just fine. Cheers.
on mouseUp
if the visible of field "rtram" is false then
show field "rtram"
else
hide field "rtram"
end if
end mouseUp
I tried your code but I noticed that the field name in the visible line is different than the field names in the subsequent lines and livecode comes back with chuck not found. Try this code... It works under the simulator just fine. Cheers.
on mouseUp
if the visible of field "rtram" is false then
show field "rtram"
else
hide field "rtram"
end if
end mouseUp
Re: something wrong with my button logic
Thanks Rick... I fixed the fields and also figured out that I wasn't compiling the scripts!
Bert
Bert
Re: something wrong with my button logic
Bert,
that requires that you put some dollars into the coffee kitty (Kaffekasse)
Best
Klaus
that requires that you put some dollars into the coffee kitty (Kaffekasse)
Best
Klaus