jmiller@hplabsz.HPL.HP.COM (Jim Miller) (08/23/90)
Suppose I do the following: * Create a stack with one card, Card "A". * Add a new card to the stack with cmd-N; call this card "B" * Delete the currently visible card B, causing card A to reappear. I was expecting an openCard message to get sent to card A upon its reappearance, but this isn't happening. I need to know when A gets re-exposed; is there a message that is getting sent in this situation that I can write a handler for, or is there some other way to do this? Thanks, Jim Miller HP Labs jmiller@hplabs.hpl.hp.com
jk3t+@andrew.cmu.edu (Jonathan King) (08/25/90)
jmiller@hplabsz.HPL.HP.COM (Jim Miller) writes: > Suppose I do the following: > * Create a stack with one card, Card "A". > * Add a new card to the stack with cmd-N; call this card "B" > * Delete the currently visible card B, causing card A to reappear. > > I was expecting an openCard message to get sent to card A upon its > reappearance, but this isn't happening. In the current versions of Hypercard, no openCard message is sent to A. How it reappears is a mystery to me, although I'd guess Hypecard keeps an internal stack of card ids that helps this to happen. > I need to know when A gets > re-exposed; is there a message that is getting sent in this situation that I > can write a handler for, or is there some other way to do this? I don't have any great ideas about this; it would almost certainly be a kluge. But, have heart: Hypercard 2.0 is supposed to fix up this problem. When a card is deleted, Hypercard 1.2 sends: deleteCard closeCard in that order (Lord knows why in that order). But Hypercard 2.0 will send: closeCard {closeBackground} --only sent if the new "front" card has a different bg deleteCard {deleteBackground} --only sent to the last (only) card of that bg {openBackground} --only sent if the new "front" card has a different bg openCard --what you'd like to see The above information, by the way, comes from 'Hypertalk 2.0: The Book', which is hot off the press from Bantam (ISBN 0-553-34737-3) and looks to be the new HyperTalk Bible. The CMU bookstore sold out of it in a day, without any fanfare. The authors of the book are Dan Winkler, who created HyperTalk and Scot Kamins, who writes documentation for the HyperCard project. The book costs $29.95, but that's not much for 958 pages of useful information. It (exhaustively?) covers the differences between HC 1.2 and 2.0, and has already helped me find many places where my stacks will have to be changed to run under 2.0 when it appears. It also clarifies *many* of the weird points and misfeatures of HC 1.2x, and supplies what looks like the complete syntax of HC 1.2 and HC 2.0 in BNF. And it also includes a complete (as of May) summary of commands/functions/properties/etc. in Hypercard 2.0, and a whole 100+ page section on XCMD issues. Plus lot of terrible puns, bug descriptions, and other useful stuff. I would have liked it to have a somewhat more complete index, but that's a quibble. Although it will be interesting to see how closely it ends up describing HyperCard 2.0, it should also be useful in the mean time, since it gives a lot more info about earlier versions than even the Hypercard Script Language Guide. > Thanks, > Jim Miller > HP Labs > jmiller@hplabs.hpl.hp.com jking