Suppressing a message?
Jan Schenkel
janschenkel at yahoo.com
Fri Jan 30 08:48:06 EST 2004
--- Doug Lerner <doug at webcrossing.com> wrote:
> But... does the above example block all messages
> associated with "delete
> graphic"? Why would it?
>
> doug
>
When you do a 'lock messages' the engine will eat
_all_ the messages it would have sent, including the
'deleteGraphic' message.
Let's explain this with the following script :
--
on mouseUp
lock messages
go card 3 of stack "Foo"
delete graphic "Bar"
go back
unlock messages
end mouseUp
--
As soon as you lock the messages, the engine will no
longer send *any* messages, until you unlock or the
engine reaches the end of the handler.
So when you
go card 3 of stack "Foo"
the engine won't send 'closeCard' or 'openCard' or
anything like that.
And when you
delete graphic "Bar"
the graphic will be deleted, but you won't get a
'deleteGraphic' message.
And when you finally
go back
again the engine won't send 'closeCard' or 'openCard'
or anything of the sort.
In short : it just blocks *all* messages.
Hope this clarified things a bit,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
More information about the use-livecode
mailing list