At 3:51 PM +0200 8/9/01, Yariv Alter Fin wrote:
>Dear List,
>
>At the finishing line of our soon-to-be-online project we are deep
>into the phase of shockwave debugging. Using the alertHook handler,
>all error messages are displayed in a text field, and the user is
>requested to restart/reload. Problem is, that since the entire
>application happens in one frame, we need to know the name of the
>script where the error has occured, since errors such as "Script
>error: object expected" are rather impossible to trace within the
>complex application code... The question is therefore, does anyone of
>a property of the sort of 'the currentHandler' or 'the
>CurrentScript'? at the moment i am planning to add a line to each
>handler, registrating it as the current one. also for this it would
>be handy to be able to autimatically retrieve the handler's name...
>any suggestions?

This is a long desired feature - currently only available using server-side
Lingo and the Multiuser Server.  Best approach (sloppy but it works) is to
have each handler post their symbol (or other ID) to a global variable when
they start running:

on yourHandler ...
  gCurrentHandler = #yourHandler
  -- actual code goes here
end yourHandler

>
>Another question is regarding 'traping' error and the return codes
>the alertHook handler returns. does anyone know what these -1,0,1 and
>2 actually mean...?

Search the Macromedia Technotes at
http://www.macromedia.com/support/director/ using the search phrase
"alerthook" - you will find all of the details you need.

Regards,
-- 

...---===|  Terry R. Schussler  |===---...
...---===|  Chief Investigator  |===---...

on accessResources
  coolSites = [ \
    "http://macromediaSEMINARS.com/";, "http://directorU.com";, \
    "http://multiuserU.com";, "http://flash5U.com";, \
    "http://dreamweaverU.com";, "http://behaviors.com/"; ]
  gotoNetPage coolSites[random(1, 6)]
end accessResources


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to