Message Path Problems

Jan Schenkel janschenkel at yahoo.com
Sat Jan 25 11:05:01 EST 2003


--- livfoss at blueyonder.co.uk wrote:
> Dear List
> 
> I found out the hard way that when there is a
> compile error in a script, then **all** the handlers
> in that script are nuked, i.e. they simply evaporate
> and so messages that expect to find such handlers in
> the message path suddenly generate 'can't find
> handler' errors. So it's no good putting 10 handlers
> in a script and debugging their syntax one by one
> (you can of course do it with the semantics).
> 

As the engine compiles the script, it compiles it in
its entirety ; so yes, the other handlers wouldn't
work anymore either.

> When there is a compile error after editing a
> script, it is reported (I thought) when you hit the
> 'Apply' button, thus warning you of problems to
> come. However, I've just experienced a problem where
> an already working handler appears to have been
> eliminated from my mainstack/ message path without
> any explicit error showing up. I can't work out how
> to find the error. The mainstack is called
> 'SC_Anchor', and I've noticed that after the 'can't
> find stack' error occurs,
> 
>   put exists(stack "SC_Anchor") returns 'true', but
> that
> 
>   put exists(the script of stack "SC_Anchor")
> returns 'false'
> 

The 'exists' function can check for the presence of
objects, not properties of these objects.
Your script isn't gone, it just isn't compiled and
therefore doesn't respond to messages sent to it.

> OTOH, my testing sequence always starts when I send
> a message from the message box saying
> 
>   send "startUp" to stack "SC_Anchor"
> 
> and that always works... (BTW, this is my solution -
> suggested earlier by someone on this list - to the
> problem of not being able to use a 'startUp' handler
> within the development environment).
> 
> I have checked the spelling of the handler's name
> and I've also checked that the handler's script is
> well formed. Just don't know what to do next. I
> would like to list all the handlers in the stack
> known to the Revo environment, but I don't know how.
> 
> Any help gratefully accepted!
> 
> Graham

I suggest you go in and 'comment' each handler one at
a time to see if that fixes the problem. This should
help you pinpoint the offending handler.
Maybe we can come up with a better strategy if you
tell us what the error is you're getting at compile
time ?

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the use-livecode mailing list