Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!hellgate.utah.edu!hamblin.byu.edu!byuvax!taylorj Date: 4 MAY 1990 22:22:30 GMT Message-ID: <1273taylorj@yvax.byu.edu> From: taylorj@yvax.byu.edu Newsgroups: comp.sys.mac.hypercard Lines: 30 Subject: Re: Naming new fields In article <4873@hemuli.tik.vtt.fi> imp@tik.vtt.fi (Ilkka Priha) writes: >In article <54453@microsoft.UUCP> peterbak@microsoft.UUCP (Peter BAKO) writes: >>How does one create a new field via a HyperCard script, and then >>proceed to give a name to this new field? Unlike a button, fields >>are not given a default name, and there is no way that I can >>reference to them. > > This should work: > >on mouseUp > doMenu "New Field" > get the number of last cd fld > set name of cd fld it to "theField" >end mouseUp Or better yet: on mouseUp doMenu "New Field" set the name of last cd fld to "theField" end mouseUp If you want to do a lot of things to the new field (change typesize, align, center, etc.), you might want to get the id of last card field, then use that, as it's faster. Jim Taylor Microcomputer Support for Curriuculum Brigham Young University taylorj@yvax.byu.edu