I have noted that when I set a button to send its action as “continuous” in Interface Builder it dos not appear to arrive in the on clicked handler.
Does it arrive by some other means?
Thanks
–Terry
I have noted that when I set a button to send its action as “continuous” in Interface Builder it dos not appear to arrive in the on clicked handler.
Does it arrive by some other means?
Thanks
–Terry
Hi Terry,
button clicks should be handeled by ‘on clicked’ no matter if continuous was selected or not - the problem is probably an other one …
D.
Hi,
I have identified why I was not appearing to get a continuous action. It was because of a delay call, see code below.
I have commented out the offending section. However, is it possible to identify when the button pressed is in “continuous mode” rather than “click mode” so I can call the delay or not as required.
Regards
–Terry
on clicked theObject
set tImageView to image view "imageView" of window "ImageViewer"
call method "decCurrentImageNum" of class "LibraryData"
displayImage(tImageView)
end clicked
on displayImage(tImageView)
set theImage to load image (call method "currentImagePath" of class "LibraryData")
set oldImage to image of image view "imageView" of window "ImageViewer"
call method "setImage:" of tImageView with parameter theImage
--delay (call method "imageViewDelay" of class "LibraryData")
--try
-- delete oldImage
--end try
end displayImage
Hi Terry,
was this above a question ??? If so … ‘continuous’ is a property (boolean value) you can ask from the button (theObject):
on clicked theObject
if (continuous of theObject) then
...
D.