Path: utzoo!attcan!uunet!samsung!rex!wuarchive!emory!gatech!udel!princeton!njin!uupsi!sunic!news.funet.fi!ousrvr!news From: av@woo.oulu.fi.oulu.fi (Ari Vaulo, LuTK/TOL) Newsgroups: comp.sys.mac.hypercard Subject: Re: fields script Message-ID: <1990Oct29.163858.6086@ousrvr.oulu.fi> Date: 29 Oct 90 16:38:58 GMT References: <1990Oct29.002315.3491@sics.se> Sender: news@ousrvr.oulu.fi Organization: University of Oulu, Finland Lines: 36 From article <1990Oct29.002315.3491@sics.se>, by ollef@sics.se (Olle Furberg): > In <485@caslon.cs.arizona.edu> musa@cs.arizona.edu (Musa J. Jafar) writes: > > OK here we go, note that there probably a lot of errors in the scripts > below, but the main ideas are (hopefully) right. > >>Till now I can not find a reason why we need field scripts. >>I would like some one to give me an example if possible? > > A simple, but very common usage of fld scripts: If a user selects/clicks on > a word in the field, the script could do something to give some information > to the user about that word. In HC 2.0 this hypertext capability is extended > by "Hot Text" and "Group text style". In this way you could put the following > script into the fld: > Another way to use field scripts is format and error control. For example if you have a field with money or date information, following little scripts may be useful. on closeField set numberFormat to "0.00" add 0 to me end closeField on closeField convert me to short date end closeField Other useful or necessary message handlers for field scripts are returnInField, enterInField, tabKey. Ari Vaulo ---------------------------------------- eMail: av@tolsun.oulu.fi University of Oulu -------------------------------------------------------- Department of Information Processing Science ------------------------------ Finland --------------------------------------------- voice: +358-81-352647