display dialog vs. display alert using "giving up after"

When I run following script it gives up after 3 seconds of each successive displayed dialog when using the Standard Additions “display dialog” command and the “giving up after” option. However, with successive “display alert” commands in the script, “giving up after” does not appear to work the same way. It appears as though “display alert” does not reset the “giving up after” option at the time that each alert dialog is presented. Instead the alerts flash onto the screen for a split second only, seemingly because the given amount of time has already elapsed in the script.

This has been bugging my curiosity. Therefore, I would like to know why these commands seem to operate differently with respect to the “giving up after” option. Is it just a bug, or is something else going on here that I am just not understanding?

delay 4

display alert "da1" giving up after 3
display alert "da2" giving up after 3
display alert "da3" giving up after 3

display dialog "dd1" giving up after 3
display dialog "dd2" giving up after 3
display dialog "dd3" giving up after 3

It looks like a bug to me.

Very peculiar indeed.

I tried:


set cd to current date
display alert "da1" giving up after 3
set cd1 to (current date) - cd
display alert "da2" giving up after 7
set cd2 to (current date) - cd
display alert "da3" giving up after 15
set cd3 to (current date) - cd
return {cd1, cd2, cd3}

which seems to prove that the giving up time doesn’t get reset

Even more peculiar:

set cd to current date
display alert "da1" giving up after 3
set cd1 to (current date) - cd
display dialog "da2" giving up after 4
set cd2 to (current date) - cd
display dialog "da3" giving up after 4
set cd3 to (current date) - cd
display alert "da4" giving up after 14
set cd4 to (current date) - cd
return {cd1, cd2, cd3, cd4}

It seems that dialog and alert use to completely separate methods for determining giving up time.