Page 1 of 1

Error clicking on image

Posted: Sun Aug 20, 2017 2:18 pm
by user#606
I am using clickfield() and this works perfectly on a text field.
However I can't find a way of preventing an error if clicked on an image.

on mouseDoubleDown
#if clickfield() not empty then
put field clickfield() into Field "expanded" on card CardExpanded
go to card CardExpanded
#end if

end mouseDoubleDown

Re: Error clicking on image

Posted: Sun Aug 20, 2017 2:25 pm
by Klaus
Hi user606,

just check the NAME of the target:

Code: Select all

on mouseDoubleDown
   if the name of the target begins with "field" then

      ## Always QUOTE names!
      put field clickfield() into Field "expanded" OF card "CardExpanded"
      go to card "CardExpanded"
   end if 
end mouseDoubleDown
Best

Klaus

Re: Error clicking on image

Posted: Sun Aug 20, 2017 3:36 pm
by user#606
Thank you again. I hate bothering you/forum, but these pitfalls don't seem to be obvious.

Re: Error clicking on image

Posted: Sun Aug 20, 2017 3:43 pm
by Klaus
Come on, you are really not bothering me and/or the forum! :D

Re: Error clicking on image

Posted: Sun Aug 20, 2017 5:32 pm
by bogs
It takes a lot to bother Klaus, and the forum in general. Lucky for you they put up with ME first :twisted: so I have smoothed the way for you :wink:

Re: Error clicking on image

Posted: Sun Aug 20, 2017 5:58 pm
by Klaus
bogs wrote:It takes a lot to bother Klaus, and the forum in general. Lucky for you they put up with ME first :twisted: so I have smoothed the way for you :wink:
:D :D :D

Re: Error clicking on image

Posted: Mon Aug 21, 2017 2:39 pm
by user#606
Thanks all!