Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!jdevoto From: jdevoto@Apple.COM (Jeanne A. E. DeVoto) Newsgroups: comp.sys.mac.hypercard Subject: Re: Protecting individual cards Summary: cantDelete property Message-ID: <44475@apple.Apple.COM> Date: 1 Sep 90 05:39:29 GMT References: <988@vm.ucs.UAlberta.CA> Organization: Apple Computer Inc, Cupertino, CA Lines: 27 In article <988@vm.ucs.UAlberta.CA> BBOLT@vm.ucs.UAlberta.CA writes: >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 property you're looking for is cantDelete. It is a property of cards, backgrounds, and stacks, and corresponds to the checkbox in the Info dialog. One way to do what you want is to place the following in the field's script: on closeField if target is empty then set the cantDelete of this card to false else set the cantDelete of this card to true end if end closeField -- ========= jeanne a. e. devoto ======================================== jdevoto@apple.com | You may not distribute this article under a jdevoto@well.sf.ca.us | compilation copyright without my permission. ______________________________________________________________________ Apple Computer and I are not authorized | CI$: 72411,165 to speak for each other. |