Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!galen!leue From: leue@galen.crd.ge.com (Bill Leue) Newsgroups: comp.sys.mac.hypercard Subject: Re: checking for field existence? Message-ID: <18322@crdgw1.crd.ge.com> Date: 8 Apr 91 12:53:44 GMT References: <1991Apr3.192733.28490@hubcap.clemson.edu> Sender: news@crdgw1.crd.ge.com Organization: General Electric Research & Development Lines: 21 In article <1991Apr3.192733.28490@hubcap.clemson.edu> jcocon@hubcap.clemson.edu (james c oconnor) writes: >I would like to be able to check to see if a field by a particular >name exists. Is this possible, or should I write an xcmd? > >Jim I asked a similar question a couple of weeks ago and got lots of good replies, so here's my chance to pay back my debt. HC 2.0 (not earlier versions!) have a "there is" operator which will do what you want. An example for detecting a field on the current card: if there is a card field "Foo" then... You can easily extend this to detecting a field in the entire stack, or any object (button, window, etc) using standard looping techniques. -Bill Leue leue@crd.ge.com