[comp.sys.mac.programmer] Custom CDEFS and TrackControl

nick@lfcs.ed.ac.uk (Nick Rothwell) (11/28/88)

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    <Atlantic Ocean>!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.