Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!apple!bc From: bc@Apple.COM (bill coderre) Newsgroups: comp.sys.mac.hypercard Subject: Re: Misc Easy HC Questions Message-ID: <44726@apple.Apple.COM> Date: 12 Sep 90 11:17:21 GMT References: <11792@crdgw1.crd.ge.com> Organization: Private Consultant for Hire Lines: 44 Bill Leue: |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. Sending a double click is possible, if you are sending it to a button or a field. You can do it by writing click at the loc of cd btn foo click at the loc of cd btn foo This method doesn't work with tools. I don't know why not. That's Just The Way It Is. |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. Well, there are a number of cases that have to be accounted for. But, once you do them, you'll be so pleased with your work.... I will repost a script to detect double-clicking the right way shortly. Please be patient. |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? Well, Hypercard will naturally re-use heap space if at all possible, but your stack will grow somewhat when used. (I've found that my stacks grow 30 or 40 K right away and then don't grow much more.) The best solution, I think, is to compact the stack on closing. But remember to check "the diskspace" and make sure there is room enough for another temp copy of the stack during compaction, or your naive user will be presented with an -- perish the thought! -- error message. bill coderre private consultant, not apple spokeman.