[comp.sys.mac.hypercard] Barn Door ?

Rob.Weinberg@f444.n161.z1.FIDONET.ORG (Rob Weinberg) (05/26/89)

I have a button script that ends in 
..unlock screen with barn door close...
 
The script and the visual effect work fine.  The *problem* is that when I activate the button {"send mouseUp to .."} from a field script, the button script works fine *except* for the barn door visual effect.  The field script begins with a "lock screen".
 
Can you tell me why I am not getting the visual effect via the field script-to-button script route?  I would like to fix up this stack and can't figure what I've done wrong.
 
Thanks!
 
Rob Weinberg

--  
-------------------------------------------------------------
FidoNet:  1:161/445      UUCP: sun!apple!bmug!<User.Name>
INTERNET:  bmug!<User.Name>@apple.COM or <User.Name>@bmug.fidonet.org
USNAIL:   BMUG, 1442A Walnut St. #62, Berkeley, CA 94709-1496
-------------------------------------------------------------
BMUG Newsletter articles due June 15!  Authors get free membership.
Send articles to:  pub@bmug.fidonet.org

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (05/29/89)

In article <194.247FEC4C@bmug.FIDONET.ORG> Rob.Weinberg@f444.n161.z1.FIDONET.ORG (Rob Weinberg) writes:
>I have a button script that ends in 
>..unlock screen with barn door close...
> 
>The script and the visual effect work fine.  The *problem* is that when I 
>activate the button {"send mouseUp to .."} from a field script, the button 
>script works fine *except* for the barn door visual effect.  The field 
>script begins with a "lock screen".

The lockScreen property (which is set to true by the "lock screen" command)
is cumulative; that is, if you set it to true twice in a script, then set
it to false, it will still be true and the screen will still be locked. (The
property is automatically set back to false at idle time.)

It looks as if you are calling "lock screen" twice (once in your field
script, and then again in your button's script). Thus, unlocking the screen
only undoes one lock: the screen is still locked and the visual effect
is not seen.

If I'm right about this, a line such as
  if the short name of the target is "My Calling Field" then unlock screen
placed just before the "unlock screen with visual effect" command will
allow the effect to be seen. You may also want to redesign things so the
screen doesn't get locked twice.

jeanne a. e. devoto
jdevoto@apple.com

Rob.Weinberg@f444.n161.z1.FIDONET.ORG (Rob Weinberg) (05/31/89)

>  It looks as if you are calling "lock screen" twice (once in your field
>  script, and then again in your button's script). Thus, unlocking the screen
>  only undoes one lock: the screen is still locked and the visual effect
>  is not seen.
--
Thanks, Jeanne, that was indeed the problem.  It worked best to rewrite things
so that I didn't
need to do a set of nested locks/unlocks.
--
Rob Weinberg

--  
-------------------------------------------------------------
FidoNet:  1:161/445      UUCP: sun!apple!bmug!<User.Name>
INTERNET:  bmug!<User.Name>@apple.COM or <User.Name>@bmug.fidonet.org
USNAIL:   BMUG, 1442A Walnut St. #62, Berkeley, CA 94709-1496
-------------------------------------------------------------
BMUG Newsletter articles due June 15!  Authors get free membership.
Send articles to:  pub@bmug.fidonet.org