I have a need to cascade dispatch commands. What I've got is of the form
Code: Select all
dispatch "someCommand" to me with someParameters
if it is not "handled" then
do_default_stuff
-- otherwise the someCommand has done its work
end if
The problem comes about if I want to extend that further, i.e., in a backscript I might have
Code: Select all
on someCommand @pParameters
do_some_work_here_with_pParameters
end someCommand
Code: Select all
on someCommand @pParameters
do_some_work_here_with_pParameters
dispatch "someCommand" to me with pParameters
end someCommand
Code: Select all
on someCommand @pParameters
do_some_work_here_with_pParameters
pass "someCommand" to me with pParameters
end someCommand
So anyone got ideas on how to cascade dispatch commands, whether or not they're found in the message path? I've got a solution that works in one specific use case, but it's too ugly to put in the margins here.