Do SQL commands interrupt the message path?
Posted: Mon Mar 09, 2015 9:44 am
I am trying to place a "rotating" image overlay group that appears any time my app is busy handling data in the background... I use the following code to update the image in the group:
I have a StartSpinner and EndSpinner handler which takes care of the variable to ensure the routine continues running...... It also makes the group visible / invisible depending on whether or not it is in use. When I force the routine to execute (using the Message interface) the image rotates beautifully.... However, when I enable the rotation through code (just before a number of SQL subroutine calls), the spinner group shows up, rotates 45 degrees exactly one time, then simply stops..... When the code moves the user to a new card, the group remains visible even though I disabled the visibility of the group in the EndSpinner handler.......
Any ideas? I am thinking the "Send XXX to me in XXX seconds" is being blocked once I begin executing the various SQL subroutines..... So what is the proper way to approach a situation like this? I want the spinner to be updating while the app is busy, but if the animation is blocked it doesn't do me any good. haha As always, any tips are appreciated!
Code: Select all
on RotateSpinner
if gKeepRotating is 1 then
put the angle of image "imgSpinner" of grp "grpSpinner" of this card into tAngle
put tAngle - 45 into tAngle
if tAngle < 0 then
put 315 into tAngle
end if
put the name of this card && tAngle
set the angle of image "imgSpinner" of grp "grpSpinner" of this card to tAngle
--send "RotateSpinner" to me in .1 second
send "RotateSpinner" to me in .1 second
end if
end RotateSpinner
Any ideas? I am thinking the "Send XXX to me in XXX seconds" is being blocked once I begin executing the various SQL subroutines..... So what is the proper way to approach a situation like this? I want the spinner to be updating while the app is busy, but if the animation is blocked it doesn't do me any good. haha As always, any tips are appreciated!