Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!fluke!ssc-vax!housen From: housen@ssc-vax.UUCP (Kevin Housen) Newsgroups: comp.sys.mac.programmer Subject: Writing a simple CDEF Message-ID: <2936@ssc-vax.UUCP> Date: 23 Oct 89 20:13:33 GMT Organization: Boeing Aerospace & Electronics, Seattle WA Lines: 27 Keywords: Help, Im losing control. I am trying to write a CDEF for a small slider control. After reading through the Control Manager section of IM, which is a little sketchy on CDEFs, and looking through back issues of MacTutor, I could use some hints. The control has only one part, the indicator (i.e. the sliding knob). The control is drawn properly, in response to a drawCntl message. But I can't get the slider to move. My intention was to use the default method of dragging, so the CDEF returns a result of 0 in response to a dragCntl message. I assumed that this would cause TrackControl to drag the indicator about - but it doesn't. In fact, the CDEF never receives a calcCRgns message, so TrackControl couldnt know the region occupied by the indicator. I would really appreciate it if someone could send me an example of source code for a CDEF, or outline the steps needed to construct a simple control, like a slider. I am using Think Pascal 2.01, but source in any language would be helpful. Thanks heaps - Kevin Housen