[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shutting down event-handling.



The scenario:  In a view-click-event-handler method, I want to let the
user specify the endpoints of a polygon.  The initial click invokes the
method, and then I handle all of the clicks after this one inside the
view-click-event-handler method via (mouse-down-p).

The problem: Say the user specifies a polygon with 6 endpoints.  My
view-click-event-handler will handle all of these clicks, but the
event-dispatcher doesn't know I handled the clicks, so it generates 5
more calls to my view-click-event-handler.

I can envision hacks like an "eat-n-clicks" function, but would prefer a
clean solution.  I would also like to avoid a context-dependant approach
where each click is handled differently depending on whether I am in the
process of creating a polygon (this would force some pseudo-global
stuff.  I hate that), but will do this if no other solution exists.

Blaine.