Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!pyramid!infmx!robertw From: robertw@informix.com (Robert Weinberg) Newsgroups: comp.sys.mac.hypercard Subject: Re: How to dismiss a PICT resource shown with "picture" command? Keywords: picture PICT mouseDownInPicture Message-ID: <1991Apr3.215110.13811@informix.com> Date: 3 Apr 91 21:51:10 GMT References: <1991Apr3.130652.12996@world.std.com> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 36 In article <1991Apr3.130652.12996@world.std.com> ralph@world.std.com (Ralph Lombreglia) writes: > >I'm displaying some PICT resources in xwindows using the "picture" >xcmd built into 2.0. I want the PICTs displayed in "rect" windows >which don't have title bars and (thus no go-away boxes), and so I'm >using a mouseDownInPicture handler to dismiss the windows. If I have >only one xwindow open, and I know the name, it's no problem: > > on mouseDownInPicture > close window > >But if I have more than one window, and use a window's name as an >argument without also specifying the user's click location (which of >course I don't know), nothing happens: > > on mouseDownInPicture "" > close window > >Any suggestions on how to script this correctly? You're very close, I think. Just specify a generic argument for the mouseDownInPicture function, like this: on mouseDownInPicture anyWindow close window anyWindow Don't specify an actual window name for "anyWindow". I think that's the way it works. -- * Rob Weinberg, graphics & publishing ***** Does a falling tree make a sound * * {uunet,pyramid}!infmx!robertw ***** if 1: no one hears it * * => Ask me about me. ***** BUT 2: it is not known that * * => Ask Informix about Informix. ***** no one hears it? *