Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!crdgw1!galen.crd.ge.com From: leue@galen.crd.ge.com (Bill Leue) Newsgroups: comp.sys.mac.hypercard Subject: Misc Easy HC Questions Message-ID: <11792@crdgw1.crd.ge.com> Date: 11 Sep 90 22:34:52 GMT Sender: news@crdgw1.crd.ge.com Organization: General Electric Research & Development Lines: 36 Here's a couple of probably trivial HC questions. I'm just getting started using Hypertalk, so please be patient if these have been hashed over before: 1. I can't find any way to either detect or simulate a double click. Is there any reasonable way? For instance, it would be useful to be able to say choose eraser tool double click to erase the entire picture. (Yes, I know you can say "doMenu Select All" followed by "Cut Picture".) Just asking. As far as detecting a double click, I suppose it might be possible to get the time in ticks on each click, then see if two clicks (at the same coordinates, more or less) were separated by some minimum number of ticks... hmmm, sounds tedious. 2. On a recent test stack I built, I implemented a little compass-like widget whose "indicator" I update using the drawing tools in a script. As I read the various Hyperscript docs, it seems that any changes I make to a card by using the drawing tools are auto-saved by HC. This means the stack is continually growing, right? What's the best way to keep the stack size under control: keep track of the freesize and compact the stack whenever it gets too big? Or can the "Revert" menu command be used in a script? My guess is that it would be painfully slow to "revert" each time you draw something on a card. 3. Has anyone come up with a clever way to simulate arbitrarily-shaped buttons, a la Supercard? Again, I could define polygonal regions and then do geometric tests on the mouse position, but this seems on first glance to be slow and complex to implement with any kind of generality. -Bill Leue leue@crd.ge.com