Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!csus.edu!ucdavis!ucbvax!LL.MIT.EDU!preston From: preston@LL.MIT.EDU (Steven Preston) Newsgroups: comp.sys.next Subject: Re: NeXTstep programming question Message-ID: <9101180951.AA06903@LL.MIT.EDU> Date: 18 Jan 91 14:51:46 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 30 In article <1048@nada.cs.utexas.edu> garnett@cs.utexas.edu (John William Garnett) writes: >I have used IB to create a window with a slider object. I have been >able to connect the output of the slider to a custom object. What I >would like to be able to do is be able to detect each mouseDown event >that corresponds to the beginning of a movement of the slider. >Similarly, I wish to be able to detect the mouseUp event that >signifies the end of a given slider movement. You can obtain the event that caused the slider to send its message using this code inside your custom object target method: NXEvent *ev; int event_type; ... ev = [NXApp currentEvent]; event_type = ev->type; switch (event_type) { case NX_LMOUSEDOWN: ... break; case NX_LMOUSEDRAGGED: ... break; } There are also many other Application methods for obtaining or peeking at the next event. See the appkit/Application.h or the class specs. -- Steve Preston