If have a ToolBar in my main Window which is controlled by a Timer in the same window, changing the Icon of one of the ToolBar Buttons:
The Timer Action:
[code] If myUpdateInProgress Then
If MainToolbar.myDatabaseItem.Icon = mydbIcon_64_Updating_01 Then
MainToolbar.myDatabaseItem.Icon = mydbIcon_64_Updating_02
Else
MainToolbar.myDatabaseItem.Icon = mydbIcon_64_Updating_01
End If
I guess the timer ticks like once a second or so, to show icons changing…
Why don’t you add a second, faster timer, which will be in charge of monitoring and managing your button action ?
In the button, just set a module boolean flag to true (“buttonClicked”)
In the button timer ;
if TimerIcon mode <> 0 then return //I call "TimerIcon" the original one where icons are switched
if buttonClicked = True then
doYourStuff //method where you do what was before in the button
buttonClicked = False
end if
This would avoid the button to become inactive at the moment the user clicks, while preventing execution while TimerIcon is fired.
I just hope the crash is only due to clicking while the icons are changed.
yeah I can confirm this one
wrote my own which just rotates between 3 images & all you have to do is click as the images are being changed
not sure if this is only cocoa or not