Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!uhccux!munnari.oz.au!murtoa.cs.mu.oz.au!rob From: rob@cs.mu.oz.au (Robert Wallen) Newsgroups: comp.sys.mac.programmer Subject: TrackControl() problems Keywords: TrackControl, CDEF Message-ID: <2838@murtoa.cs.mu.oz.au> Date: 25 Sep 89 00:45:27 GMT Organization: Comp Sci, Melbourne Uni, Australia Lines: 29 I dont know whether this is me not reading enough of Inside Mac (can you really do that anyway?) or have I hit a 'bug'? I have a couple of custom-CDEFs I have been working on which use autotrak routines. Ref: Inside Macintosh I-323, The Control Manager, "Mouse Location" "When the mouse button is released TrackControl returns with the part code if the mouse is in the same part of the control that it was originally in, or with 0 if not (in which case the application should do nothing)" Now, when I call TrackControl() with my control, I see it hilite (sic) correctly when the mouse is moved in/out of it but TrackControl ALWAYS returns the 'inButton' code that the first call to TestControl() within TrackControl() (yes, I can drive TMON) returned. My CDEF is returning 'inbutton/zero' correctly but TrackControl() seems to be ignoring it. Its not clear from Inside Mac whether the autotrack message should actually return a value anyway; MacNosy would appear to say Nope. Should TrackControl() be returning zero if the mouse was released outside the active area, or should my caller just ignore TrackControl's return value? Thanx in advance, Rob -------------- "I meant," said Ipslore, bitterly, "what is there in this world that makes living worth while?" Death thought about it. CATS, he said eventually, CATS ARE NICE. -- Sourcery, Terry Pratchett