Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!pasteur!eris!korn From: korn@eris.berkeley.edu (Peter "Arrgh" Korn) Newsgroups: comp.sys.mac.hypercard Subject: Re: Deleting Cards Unintentionally Message-ID: <5281@pasteur.Berkeley.EDU> Date: 28 Aug 88 20:15:04 GMT References: <13631@agate.BERKELEY.EDU> <65844@sun.uucp> <16219@apple.Apple.COM> <2815@pt.cs.cmu.edu> Sender: news@pasteur.Berkeley.EDU Organization: What, me organized??? Lines: 44 In <2815@pt.cs.cmu.edu>, tgl@zog.cs.cmu.edu (Tom Lane) said: >... >2. How come the "can't delete" bit for backgrounds and cards is not a >script-accessible property? I can envision a background script reading > on newCard > set the undeletable of this card to true > ... Tom, it IS a script-accessible property. It's called the "cantDelete" property, and it is both a card and background property. on newCard set cantDelete of this card to true ... works quite nicely. In most all of my stacks I set all cards to be non-deletable, and then have a handler in the stack script that goes through and flushes all of the data cards. It typically looks like this: on flushDataCards put "Flushing cards in this stack..." go to first card set cursor to "busy" repeat go to next card -- I never want to delete first card set cursor to "busy" put short name of this card into cardName if cardName = "name of template card" then exit repeat set cantDelete of this card to false doMenu "delete card" end repeat end flushDataCards It should be noted that this only works in HyperCard 1.2 or later... Peter -- Peter "Arrgh" Korn korn@ucbvax.Berkeley.EDU {decvax,hplabs,sdcsvax,ulysses,usenix}!ucbvax!korn