Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!lavaca.uh.edu!jetson.uh.edu!englfz From: englfz@jetson.uh.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Checking for a named object sans error if nonexistant Message-ID: <6777.26c6bdce@jetson.uh.edu> Date: 13 Aug 90 19:48:46 GMT References: <5611@uwm.edu> <43714@apple.Apple.COM> Distribution: usa Organization: University of Houston Lines: 31 In article <43714@apple.Apple.COM>, bc@Apple.COM (bill coderre) writes: > John Bowden: > |I have a stack that creates other stacks and I need to verify whether > |certain stacks were so created. > I'll summarize his second question: > "Is there a way to determine whether a certain (object) exists?" > > Well, in HC 1.x, no. > > bill coderre, consultant to Apple The way I check to see if an object (field, button or something) exists and then get its name looks something like the following: on checkfield if the number of card fields > 0 then put the name of cd field 1 into fieldname end checkfield With this approach, it only gets the name if a field exists, and therefore won't give you the "Never heard of..." message if you are checking for the name of a nonexistant somethingorother. Hope this helps --------------------------------------------------------------------- Ed Gibler University of Houston ENGLFZ@JETSON.uh.edu English Computer Writing Lab ---------------------------------------------------------------------