Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!oliveb!felix!dhw68k!thecloud From: thecloud@dhw68k.cts.com (Ken McLeod) Newsgroups: comp.sys.mac.programmer Subject: Re: Odd scrollbar behavior with TrackControl Message-ID: <14074@dhw68k.cts.com> Date: 28 Oct 88 10:46:39 GMT References: <942@ccnysci.UUCP> <13726@dhw68k.cts.com> <953@ccnysci.UUCP> Reply-To: thecloud@dhw68k.cts.com (Ken McLeod) Organization: Wolfskill residence; Anaheim, CA (USA) Lines: 31 In article <953@ccnysci.UUCP> alexis@ccnysci.UUCP (Alexis Rosen) writes: >Unfortunately, he erred in exactly the opposite direction that I did. I first >said, "I'm using an ActionProc, and its arguments are sometimes garbage." Ken >responds "Declare you arguments explicitly." That's exactly what I was doing, >and that's why I was crashing. Sorry for the confusion... I must have misread your original post. If you've set up an if-else construct to filter out "inThumb" from the other part codes, you can call TrackControl with the appropriate one of your 2 actionProcs (the one with NO args). Of course, your control handle needs to be defined globally, since it can't be passed to that actionProc. As for the weirdness with the outline that gets dragged, is it possible that 1) your control handle is getting trashed somehow as large amounts of memory are moved around during the actionProc? You might try explicitly locking the control handle before calling TrackControl with it to see if that makes a difference. Or 2) the scroll bar CDEF itself might have gotten munged? Does this occur with different Systems active? (Or 3) ????) >In fact, ActionProcs take EITHER two args (normal case) or none, for "dial >indicators." That's one ugly interface. Yuck. (Wonder how NeXT does it ;-) You're right --- it's not too pretty. :-( I've never needed to draw anything *while* the thumb was being dragged, and therefore have never had 2 actionProcs at the same time, so guess I never noticed it before. ("Two at the same time? That's bigamy!") -- ========== ....... =========================================== Ken McLeod :. .: uucp: {spsd, zardoz, felix}!dhw68k!thecloud ========== :::.. ..::: InterNet: thecloud@dhw68k.cts.com //// ===========================================