Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP Path: utzoo!linus!wanginst!vishniac From: vishniac@wanginst.UUCP (Ephraim Vishniac) Newsgroups: net.micro.mac Subject: Re: Re: Is My Thumb an Indicator? Message-ID: <1339@wanginst.UUCP> Date: Mon, 18-Nov-85 09:17:30 EST Article-I.D.: wanginst.1339 Posted: Mon Nov 18 09:17:30 1985 Date-Received: Thu, 21-Nov-85 06:34:09 EST References: <1283@wanginst.UUCP> <1318@wanginst.UUCP> <277@well.UUCP> Distribution: net Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 46 > In article <1318@wanginst.UUCP> vishniac@wanginst.UUCP (Ephraim Vishniac) writes: > >> (you've all read this part before, so I'll just skip it) Fred Huxham replies: > On page 20 of the Control Manager (phone book edition) it says: > > "- If actionProc is NIL, TrackControl performs no additional actions. > This is appropriate for simple buttons, check boxes, radio > buttons, and the THUMB OF A SCROLL BAR." > > You shouldn't need to call an actionProc for a mouseDown in the thumb of > a scroll bar unless your scroll bar does some very weird things. > > If your scroll bar (thumb) has to exhibit strange behavior, what is it that > its supposed to do? From the varied replies I've gotten, it seems my original query didn't stress some pertinent points strongly enough. I'm trying to use a scroll bar in a modal dialog, using _ModalDialog. With no action proc, the thumb is entirely functional, just as Fred points out. However, the scrolling arrows and paging regions do nothing. I installed an actionProc because I thought it was the obvious way of implementing scrolling and paging. This resulted in the originally described problem: my action was called with arguments for scrolling or paging and without arguments for thumbing. Correspondents have made essentially three suggestions: 1. On entry to the action proc, check the arguments on the stack for plausibility (esp., does the control handle match?). If implausible, assume that there are no arguments and that the thumb was pressed. This is a real hack. 2. Write a filter proc for _ModalDialog. On each mousedown event, test whether the mouse is in the scroll bar and, if so, what part it's in. Install or remove the actionProc (or swap actionProc's) as appropriate. This is the Apple-approved hack, courtesy of Larry Rosenstein @ Apple. 3. Write a control definition in which the thumb is not an indicator. This might not be as much work as it sounds, since I think I saw the source for the scroll bar CDEF in the last software supplement. For now, I'm sticking with (1). It's simple, robust, and disgusting. -- Ephraim Vishniac [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac vishniac%Wang-Inst@Csnet-Relay