Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!zardoz.cpd.com!dhw68k!mrx From: mrx@dhw68k.cts.com (Mark Murphy) Newsgroups: comp.sys.mac.hypercard Subject: Re: problem with returnInField Keywords: HC 2.0 pass handler Message-ID: <1990Dec5.163201.14255@dhw68k.cts.com> Date: 5 Dec 90 16:32:01 GMT References: <2419@pbhyg.PacBell.COM> Organization: Wolfskill & Dowling residence; Anaheim, CA (USA) Lines: 28 In article <2419@pbhyg.PacBell.COM> mwan@PacBell.COM (Miu Wang) writes: > >Help...I've just started playing with HC 2.0 and have a proble with the >"returnInField" message. > >I have a script: > > on returnInField > do something > pass returnInField > end returnInfield > >What I want to do is to "do something" when the user types a "return" in a >text field, then have the system do its normal thing (put a return character >in the text field and move the insertion point to the beginning of the next >line in the field and allow the user to continue typing. But HC does not >return control to the text field after the "do something". Bummer... > What does your "do something" do? If your handler manipulates another field, you will run into problems because the current selection will become unselected. If you are doing this, the way around it is to get the current selection... save it... do what you have to do... then reselect the original selection. I must warn you, it can be cosmetically unpleasing. -- mark mrx@dhw68k.cts.com