Path: utzoo!utgpu!watserv1!watmath!att!rutgers!usc!wuarchive!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!mts.ucs.UAlberta.CA!ualtavm!BBOLT From: BBOLT@vm.ucs.UAlberta.CA (Bob Bolt) Newsgroups: comp.sys.mac.hypercard Subject: Protecting individual cards Message-ID: <988@vm.ucs.UAlberta.CA> Date: 31 Aug 90 15:46:10 GMT Reply-To: BBOLT@vm.ucs.UAlberta.CA Organization: University of Alberta VM/CMS Lines: 25 Disclaimer: Author bears full responsibility for contents of this article I have been working on a stack in which I would like to be able to protect individual cards from being deleted when certain conditions are met, such as a field containing an entry. If the field is empty, the card can be Cut or Deleted. If the field contains something, then the card should be protected. I realize that I can protect the card by clicking the check box in Card Info, but I want to set this property from a script. The only way I can see is the following: on deleteCard if field fieldName is not empty then doMenu "Copy Card" doMenu "Paste Card" end if end deleteCard Placing this handler in the Background script provides the protection,but it is not exactly the cleanest way to handle the job and it has the unfortunate side effect of changing the card id number. If anyone knows of a way to handle this more efficiently, I would appreciate hearing about it. Bob Bolt BBOLT@VM.UCS.ALBERTA.CA