like pass, but without ending the handler
Mark Schonewille
m.schonewille at economy-x-talk.com
Wed Feb 28 05:49:36 EST 2007
Hi Dick,
Why don't you use different handler names?
in stack:
on stackHandler p1,p2,p3
-- do something
end stackHandler
on cardHandler p1,p2,p3
stackHandler p1,p2,p3
-- do something here
end cardHandler
If the card doesn't contain a cardHandler script, you can run the
stackHandler script by including the cardHandler in the stack script:
on cardHandler p1,p2,p3
stackHandler p1,p2,p3
end cardHandler
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Get your store on-line within minutes with Salery Web Store software.
Download at http://www.salery.biz
Op 28-feb-2007, om 9:11 heeft Dick Kriesel het volgende geschreven:
> If you have a handler that needs to do something after letting the
> message
> proceed along the message path, here’s a pithy way:
> call the params of the owner of me
>
> One example scenario involves a newGroup handler that needs its
> owner’s more
> general handler to run before the more specific handler can finish
> its task.
>
> For a demonstration, try the following:
>
> 1. create a new main stack and give it this script:
> on foo p1,p2,p3
> put "hello from" && me && "with" && the params & cr after msg
> end foo
> 2. give the card this script:
> on foo p1,p2
> put ""
> call the params of the owner of me
> put "hello from" && me && "with" && the params & cr after msg
> end foo
> 3. in the message box, enter "foo 1,2,3" without the quotes
> 4. see the following:
> hello from stack "Untitled 1" with foo "1","2","3"
> hello from card id 1002 with foo "1","2","3"
>
> It works for me. If you find a case where it doesn't, please let
> me know.
>
> Or is there a better way for an initialization handler to invoke
> its parents
> without skipping remaining statements?
>
> -- Dick
>
More information about the use-livecode
mailing list