usage of "this"
Rob Cozens
rcozens at pon.net
Sun Nov 3 06:19:01 EST 2002
> > if tCalcType is not empty then
>> go to first card of stack tCalcType as toplevel
>> -- close the the current... the stack we were just in.
>> -- close this stack -- nope; "this stack" has now changed!
>> close stack "FacilityCalculator"
>> end if
>>
>
>
>While I'm still simply a newbie lurker... I think your answer lies in a post
>on 10/24 from Rob Cozens titled "Heads Up For HyperCard Stack Converters ".
Jim, Alex, et al:
To expand my previous post, I believe "this" can always be
interpreted as "the current". For example, suppose I'm at card A and
click on a button whose handler takes me to card B. If the short
name of "this card" is displayed, it should be "A" before 'go to card
"B"' and "B" after.
In the scenario above, dynamicPaths determines whether card A and its
controls or card B and its controls receive messages after 'go to
card "B"'. In standard RunRev (dynamicPaths = false) card A and its
controls continue to receive messages until the handler ends. In
converted HC stacks (dynamicPaths = true) card "B" receives all
messages after 'go to card "B"'.
IMFO, Apple & HC did it wrong here: If one clicks on a control that
goes to another card with dynamicPaths = true, the mouseLeave message
is sent to the new card, not the one you just left. Without
workaround scripting, the mouseLeave handler will generate a runtime
error if there is no control on the new card with the same name, id,
or number (depending on your form of reference) or the handler
references other controls missing from the target card.
Way back when, before I knew about dynamicPaths, I asked Kevin to
test the above scenario. I was SO pleased RunRev did not display
HC's behavior in this regard. Virtually every OenoLog button with a
mouseLeave handler contains or references a workaround for the
dynamicPaths problem...it will feel SO good to delete all that
verbiage.
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list