Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!hc!lanl!unm-la!unmvax!charon!hydra.unm.edu!stone From: stone@hydra.unm.edu.unm.edu (Andrew Stone CS.DEPT) Newsgroups: comp.sys.mac.hypercard Subject: Re: Fast way to create a button? Summary: here's a trick Keywords: trapping domenu new card, copying card btns Message-ID: <3723@charon.unm.edu> Date: 21 Sep 88 18:28:05 GMT References: <3060@pt.cs.cmu.edu> Sender: news@charon.unm.edu Reply-To: stone@hydra.unm.edu.UUCP (Andrew Stone CS.DEPT) Distribution: na Organization: University of New Mexico, Albuquerque, NM Lines: 44 In article <3060@pt.cs.cmu.edu> tgl@zog.cs.cmu.edu (Tom Lane) writes: >I have a stack in which I would like to automatically create a card button >on each new card (and no, a background button is not a better solution; >details on request). The best way I've found to do this is to include a >doMenu "New Button" in my newCard handler, thus: > >on newCard [ his way ] I developed a stack, "le Artiste" which required that the "tool" bar button be a card button, else the new art would obscure it. So to create a new card with this special button in the card layer, I trap the domenu "new card" and call `myNewCard': on myNewCard choose button tool click at loc of btn theCardButton domenu "Copy Button" send "Domenu new card" to hypercard -- the crux of the biscuit -- how to avoid infinite loop with on domenu which domenu "Paste Button" choose browse tool end myNewCard >An only slightly less annoying aspect is that the cursor flickers >during this handler, even though the screen is locked. (It doesn't >seem to change shape, but it does flicker.) This could be a bug in >HyperCard -- I'm using version 1.2. add " set cursor to none" and see what happens > tom lane >Internet: tgl@zog.cs.cmu.edu --andrew ||<<++>>||<<-->>||<<==>>||<<++>>||<?>>||<<++>>||<<-->>||<<==>>||<<++>>|| || || || Andrew Stone stone@hydra.unm.edu (505) 345-4800 || || || ||<<++>>||<<-->>||<<==>>||<<++>>||<?>>||<<++>>||<<-->>||<<==>>||<<++>>||