Path: utzoo!attcan!uunet!mcvax!ukc!etive!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: Custom CDEFS and TrackControl() Message-ID: <1105@etive.ed.ac.uk> Date: 28 Nov 88 15:22:52 GMT Sender: news@etive.ed.ac.uk Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 21 I've been playing around with doing AutoTrack on the built-in controls, and a custom CDEF. Two questions: (i) If I pass an explicit AutoTrack parameter to TrackControl(), it gets called repeatedly for the standard scroll-bar controls (although this is not much use, since it can't have any parameters if you're dragging the thumb, and the contrlValue field isn't updated...). How does this get called for custom CDEFS? Or is there no way? (ii) I finally got round this by passing -1L to TrackControl, and putting the autotrack routine in the control record. In order to get immediate feedback, I use my OWN CALLING CONVENTION for the callback routine - the value and refCon as arguments. This seems to work fine, by the way... but is it dangerous? Might it fail to work one day? Nick. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk!mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ...while the builders of the cages sleep with bullets, bars and stone, they do not see your road to freedom that you build with flesh and bone.