errorDialog broken?

Mark Waddingham mark at livecode.com
Thu Apr 14 11:23:14 EDT 2016


On 2016-04-14 17:06, Richard Gaskin wrote:
> It's almost like the IDE engine has had special handling added at some
> point to send errorDialog messages directly to one particular IDE
> script.

To be fair, it does say in the dictionary under 'errorDialog':

Note: The errorDialog message is only sent while Script Debug mode is 
turned off. To toggle Script Debug mode, click on the Development menu 
of LiveCode's menubar.

So at least the behavior you are seeing is documented (for once ;)) [ of 
course, I cannot say whether that note was added because that was the 
observed behavior, or whether it was the intended behavior ].

The IDE engine itself doesn't have any special handling for errors 
(relative to the standalone engine) - however, the IDE must be doing 
something *somewhere* as the part of the engine which implements the 
engine-side part of the debugger is distinct from the part which 
dispatches the errorDialog message (as far as I can see anyway).

The errorDialog message does interact with the 'lock error dialogs' 
command - if the latter has been called then it changes the target of 
the errorDialog message to the object which administered the lock (this 
remains until the current handler stack resolves, or 'unlock error 
dialogs' occurs).

My general feeling is that the errorDialog message should not be 
affected by Script Debug Mode. Ideally, the debugger would kick in when 
an error is thrown (allowing you to see the context of the error) and 
then when you click 'Continue' it should then still propagate an 
errorDialog message.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the Use-livecode mailing list