Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!orstcs!nyevax!johnsot From: johnsot@nyevax.CAS.ORST.EDU (Tim G. Johnson) Newsgroups: comp.sys.mac.hypercard Subject: Re: Strange behaviour (dare I say bug) Message-ID: <385@nyevax.CAS.ORST.EDU> Date: 5 Mar 89 07:31:02 GMT References: <633@cf-cm.UUCP> Reply-To: johnsot@mist.CS.ORST.EDU (Tim G. Johnson) Organization: Oregon State University, Dept. of Computer Science Lines: 37 In article <633@cf-cm.UUCP> ralph@computing-maths.cardiff.ac.uk (Ralph Martin) writes: >I was trying to implement a "find next" button, so I thought that a simple >on mouseUp > returnkey >end mouseUp >would do the trick. However, it doesnt. > >If I hit a find button (of the sort in the button ideas stack) and >find what I am looking for, and hit return, I get the next occurrence >of the text to be found. > >If I hit a find button and find what I am looking for, and hit my find next >button, I get the SAME occurrence. > The reason this doesn't work the way you expected is because HyperCard assumes that you didn't want to do another 'find' as soon as you pressed the mouse button. Before the button gets the mouseUp signal, you will notice that the find rectangle disappears from around the found text. When the 'returnKey' signal is sent from the button, it executes what is in the message box, presumably the find command, and, having starts the find from scratch on that card, causing the same occurance as before to be found. As far as I know there is no way to stop the mouse from causing this, so I just teach my users how to press the return key to find the next occurance. I'm sure you can find some way to make this user-friendly so you don't have to teach about the message box (maybe a field in the corner that reflects what is being looked for, and a note under that that tells them to press return to find next). Then again, maybe there is a way to do it with a button, Dan?? -- -Tim G. Johnson -johnsot@mist.CS.ORST.EDU