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

view-click-event-handler (fred-dialog-item) musings



i am writing a bit of code which does selections in a MCL-based
equation-editor.  the editor relies, thank goodness, on much of the classy
handling of fred-dialog-items.  unfortunately, i need to be able to select
multiple items, including the freds.  as it turns out selections which start
outside of fred i can handle fine (because i can write my own
view-click-event-handler).  however, i need to be able to begin a selection
in fred (with all the normal fred view-click-event-handling stuff intact)
and when i leave the originally-clicked fred (with-mouse-down), move into
another selection routine (multi-view, as opposed to single-view)...  of
course, it should return to the fred-methods if the mouse returns to the
original view.

i suspect it's possible to do this with the view-leave-event-handler and
view-enter-event-handlers, but these functions then become quite
complicated.  in fact, i've failed in two brief attempts at implementing
this solution.  what exactly happens when you call one event handler from
another event handler?  is it the same as with other methods?  you see, my
problem is -- if you keep dragging in and out of the view, you could build
up a huge stack of event handlers... can this, in fact, happen?  can it be
avoided?

it occurred to me that my task would be vastly simplified, by just
appending my macro-selection routine to the micro-selection routine in
view-click-event-handler (fred).  fait accompli?  it seems to me, though,
that this has violated some rule of programmer conduct.  should i care?

can you send me the view-click-event-handler method for fred-dialog-item?
or a suggestion for a better implementation?

thanks, as always, for your help

chris crone
school of education and social policy
northwestern university