Answer Dialog Resets Cursor

Rob Cozens rcozens at pon.net
Mon Dec 19 10:47:35 EST 2005


Hi All,

In case it may save someone else some debugging time in the future, 
it appears that one must lock the cursor before an answer dialog or 
reset it afterward:

on mouseUp -- 18 Dec 05:RCC
   set cursor to watch
   switch (the short name of the target)
   case "First"
     play audioClip "click.au"
     go to first card
     break
   case "Previous"
     play audioClip "click.au"
     go to previous card
     break
   case "Next"
     play audioClip "click.au"
     go to next card
     break
   case "Card Titles"
     get the selectedText of button "Card Titles"
     if it is the short name of this card then exit mouseUp
     play audioClip "click.au"
     put it into cardName
     if it is not "Photo Index" then get "I'll wait"
     else
       answer warning "Rendering the photo index may take more than 
90 seconds." with "Forget it" or "I'll wait"
       play audioClip "click.au"
     end if
     if it is "Forget it" then exit mouseUp
     set cursor to watch -- without this statement, cursor reverts to 
hand   <<<
     go to card cardName
     break
   case "Photo Index"
     play audioClip "click.au"
     answer "Rendering the photo index may take more than 90 
seconds." with "Forget it" or "I'll wait"
     play audioClip "click.au"
     if it is "Forget it" then exit mouseUp
     set cursor to watch -- without this statement, cursor reverts to 
hand    <<<
     go to card "Photo Index"
     break
   case "Zoom Bar"
     play audioClip "click.au"
     zoomImage
     break
   default
     beep
   end switch
end mouseUp

Of course, one could lock the cursor; but then the watch is shown in 
the answer dialog.

Rob Cozens, CCW
Serendipity Software Company

Vive R Revolution!




More information about the use-livecode mailing list