errorDialog Message question

Jerry Daniels jerry at daniels-mara.com
Wed Aug 11 09:17:08 EDT 2004


RIchard,

Thanks for the info. I think I already understood backscripts. I did  
try changing the order of my backscripts. What I can't do is get my  
errorDialog handler to catch a message in my back script without  
removing revBackScript permanently.

I insert my backscript, then remove revBackScript, then insert  
revBackScript again, so that my backscript will come before  
revBackScript in the hierarchy. No dice. Doesn't seem to work. Nada.  
Try it and see.

1. Create a btn with an errorDialog handler
2. Insert its script into back
3. Remove revBackScript from back
4. Insert revBackScript into back
5. Create another button that causes an execution error
6. Click the error-producing button

Does your errorDialog handler get called? Mine doesn't.

I have tried other variations of this as well. Remove revBackScript,  
insert my backscript, and then re-insert revBackScript. Nada as well.

I'm already catching the compiling errors, but thanks for the heads-up.

Best,

Jerry


On Aug 11, 2004, at 1:00 AM, Richard Gaskin wrote:

> Jerry Daniels wrote:
>
>> Gang,
>> I've been in the archives looking for others who may have had trouble  
>> with the errorDialog message.
>> While most of the posts dealt with the errorData this message  
>> delivers, my problem revolves around trapping this message with a  
>> handler in the IDE. I am developing a script editor and want to  
>> handle my own execution errors.
>> It seems the revBackScript is the only one getting any errorDialog  
>> messages in the Rev 2.2 IDE. If I lock error dialogs, then I get the  
>> message, but I can't put a lock error dialog statement in every  
>> handler, now can I? I've tried inserting a script in back like  
>> revBackScript, but it doesn't matter where I put it, I don't get  
>> errorDialog messages unless I remove revBackScript.
>> I know Richard has been mucking about with this rascal, maybe he  
>> knows the path to salvation?
>
> I put together an article on extending the Rev message path for just  
> such occassions:
> <http://www.fourthworld.com/embassy/articles/ 
> revolution_message_path.html>
>
> In reference to backscripts, I note there:
>
>    Scripts inserted first take precedence over scripts inserted later.
>
> So when you insert a backScript, it goes in bsck of any existing  
> backscripts.
>
> Fortunately, the opposite is true of the corollary to backscript:  
> frontScripts.
>
> With frontScripts, those inserted later are put in front.  So if you  
> insert a frontScript and the Rev IDE is already loaded, your script  
> can get system messages before the IDE gets them.
>
> Note that the errorDialog message will only address execution issues.  
> To trap for compilation issues you'll want to handle the  
> scriptParsingError message.
>
> -- 
>  Richard Gaskin
>  Fourth World Media Corporation
>  ___________________________________________________
>  Rev tools and more:  http://www.fourthworld.com/rev
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list