I don’t think this is as complicated as you’re currently thinking it is. With title "(2nd order nested handler)" with icon caution See why I’m confused?)ĭisplay dialog "Error " & errorNumber & return & return & ¬ĮrrorMessage buttons default button 1 ¬ So why doesn’t this concept script terminate with the error number -128 in the second_order_nested_handler() ? Why does it work itself back up to the first_order_handler(), and only terminates there? (You never hear the beep in the run handler, so why does the error number -128 work in the 1st handler, but not in the 2nd nested handler? ” they seem otherwise identical. I was wanting to use that to make an applet quit upon a certain error in a handler (with a two-line quit/error number -128 combination). Thanks for all the help, guys! … I’m still confused about one thing: I thought that error number -128 stops a script dead in its tracks. Besides that programming languages who support GoTo cannot jump from one routine into another, they can only jump within the same routine because it’s how the stack works. Going back to the labeled jumps in code is everything the programming language is designed not to do, therefore it’s evil and should never be used in any circumstances. It’s how modern programming languages are designed. Jumping back and forth in code is done using loops, if statements and routines who are all auto-indexed for you. Use user defined handlers then which are called from the Idle handler too. Here’s where I wish there were a GoTo command in AppleScript! I don’t want a quit/return because I might be running it in a script editor, or in an applet I may want to stop the main run handler and go straight to an idle handler.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |