briany at qldlearning.com
Mon Oct 26 13:54:20 CDT 2009
This is probably highly unnecessary, but I found it interesting to
pass keyDown to this stack
A "pass" with a target =)!
> The way I rationalize it is along your line of thinking, Jacque.
> Basically I see a system message as something only the engine can
> create. As soon as you use "send", you are creating a custom user-
> level message like any other. What you have sent is NOT a system
> message any more, it's just some sort of clone which lacks its
> "system" identity. So it will just travel the message hierarchy the
> same way as if you had changed the message to "BriansKeyDownHandler".
> I'm sure there are exceptions, but I think Hypercard had more of a
> anything goes attitude. If you send a message, it would actually
> simulate the behavior whenever possible. Perhaps the liberal use of
> doMenu for even system tasks (copy / paste for example) instilled
> this deeply?
> Ideally (in my mind), if Rev wants to be strict then it should just
> not allow you to "send" system messages. Either pass them, don't
> pass them, or use send with a non-reserved name. Then there would be
> little room for expecting them to continue to behave as system
>> Richard Gaskin wrote:
>>> Perhaps HC allowed you to send message to any arbitrary point in
>>> the message path beyond the current script regardless whether or
>>> not there's a handler for it there as a more verbose alternative
>>> to "pass". But as I explained in detail earlier there are reasons
>>> why Rev doesn't work the same way with messages, and instead
>>> requires that you use the method which is simpler and faster in
>>> both xtalks, "pass <messageName>".
>> I think Craig's question is more basic. He wonders why sending some
>> keywords to a stack will then pass that message along the hierarchy
>> automatically if the target object doesn't have a matching handler,
>> but sending other keywords doesn't. I.e.:
>> send "beep" to this stack -- passes it through the message path
>> send "keydown" to this stack -- stops the message with an error at
>> the stack level
>> I have an untested theory. Command keywords will pass through the
>> hierarchy, but system messages won't. ("Beep" is a command.
>> "Keydown" is a system message.) I'm not sure what built-in
>> functions would do but I'm guessing they'd act like command keywords.
>> No time to test or verify; maybe someone else can.
More information about the use-livecode