[comp.sys.mac.hypercard] Picture XCMD - strange behavior

sherer@oucmail.cc.nd.edu (Michael Sherer) (11/16/90)

I've been trying to work with color PICT's in HC 2.0 using the Picture 
XCMD which is nicely documented in the Power Tools Stack.  The initial 
picture call works fine, except when I had to locate the PICT file it 
pasted a bitmap of "find files in..." card on my card.  Thereafter I was 
unable to resize the window, move it, or hide it, the last being 
especially bad when you called up a window without a close box.  I was 
using variations on the following script:

on mouseup
   Picture "MyPict",file
   wait 5 seconds
   hide window "MyPict"
end mouseup

The first time I ran this script it closed the window, thereafter the 
window just sat there.  Other set commands trying to impact the location 
and size of the window failed similarly.  Has anyone else had trouble with 
this?
-Michael Sherer                           sherer@oucmail.cc.nd.edu
University of Notre Dame
Standard Disclaimer

maller@applelink.apple.com (Steve Maller) (11/17/90)

In article <1990Nov15.191900.10802@news.nd.edu> sherer@oucmail.cc.nd.edu 
(Michael Sherer) is having trouble with this script after running it 
multiple times:
> on mouseup
>    Picture "MyPict",file
>    wait 5 seconds
>    hide window "MyPict"
> end mouseup

You should use "close window ...". Hiding a window leaves the window 
around, but makes it invisible. Therefore we get confused because there 
quickly becomes multiple windows with the same name. We always choose the 
first window that matches the name, visible or not...

--------------------------------------------------------------------
Steve Maller                    Disclaimer: Please don't tell anyone
Software Commando                           you saw me here.
HyperCard Engineering Team
Apple Computer