Newsgroups: comp.sys.atari.st.tech Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!rpi!image.soe.clarkson.edu!AAron From: AAron@image.soe.clarkson.edu (AAron nAAs) Subject: Re: Right Mouse Button Programming Message-ID: <1990Jul31.034837.19230@sun.soe.clarkson.edu> Sender: AAron@sun.soe.clarkson.edu (AAron nAAs) Organization: Clarkson University, Potsdam, NY References: <1961@ncrcam.Cambridge.NCR.COM> Date: 31 Jul 90 03:48:37 GMT Lines: 39 From article <1961@ncrcam.Cambridge.NCR.COM>, by mreiss@ncrcam.Cambridge.NCR.COM (mreiss): > > We are currently working on a project that we need to use the right mouse > button. (Really both buttons, but ...) We have been able to get the left > Michael A. Reiss | > | mike > USENET = Mike.Reiss@Cambridge.NCR.COM | We was doing a project that required the use of both buttons a few months ago, and people suggested we stray from the easy event multi approach and write our own mouse handlers... Didn't know much about that approach, but once you got one working I am sure it would be much better than the double button support of event multi. As I recall you can have event multi report on left button, right button, both buttons (pressed at the same time), or neither buttons. You can't have it respond to a left click OR a right click (Which is quite a shame). Our solution was to set it to respond to NEITHER buttons, which after still requesting mouse button events, made it fall out no matter what happened. We did some experimenting and found out how to make it work. With the event multi CONSTANTLY falling through, we could check that the variables of the event multi that had to do with the button states. Thus we could tell what was happening to EITHER/BOTH of the mouse buttons. We may have used the event mouse for certain loops, but the concept is the same. This approach seems to actually be defeating the purpose of the event multi, which drops out on a specified event. In our case we ended up using it as a mouse button status reader, and if no buttons were pressed our code, after doing nothing, eventually looped back to the event multi to continue again. AAron nAAs AAron@sun.soe.clarkson.edu Disclaimer: Don't like it? Don't do it...