[comp.sys.mac.hypercard] HC Line Dragging Problem

CSTWMJPC%UIAMVS.BITNET@CUNYVM.CUNY.EDU (Michael Wolf) (04/17/89)

        I have a slight problem that I could use a little help with.


      I am working on a stack.  When the user clicks on the card screen, not
in any buttons or fields,  the tool should go to the line tool and the user
should be able to then drag the tool around as if they were in the draw mode
regularly.  When the user releases the mouse button the tool reverts to the
browse tool and the length in pixels of the line is calculated.
      The problem I have is that when the mousedown is received by the card
I select the line tool.  The mousestilldown messages are now sent continually
until released, at that time the length is calculated.  To accomplish this I
have had to do a mousestilldown routine which remembers the original mouseclick
location and does a line tool drag to the current mouseloc.  Once this is done
I have to do a "domenu undo" and repeat the process.  This is very slow and
choppy routine.  It does not look too good on the screen and it runs to slow to
be very exact with the original mouse location unless the user keeps the same
mouseloc for a moment before draging the line tool around.
      I have tried to just select the line tool on the mousedown but it will
not complete the selection of the line tool until the mouseup is sent.  But that
is too late, I need it too get to the drag tool in the mousedown, and allow
the user to drag the tool regularly, which is much faster by a landmark.
      I could use some ideas on how to get around this and to accomplish what
I want without having to do the undo method of drawing the line tool.


                                                              Michael Wolf
                                                               CSTWMJPC@UIAMV