CLIM mail archive

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

No Subject



I need to figure out how to abort the currently-running input-process of a
frame from outside the frame.

For example, assume that I have two frames, call them EDITOR-1 and
EDITOR-2.  Each editor works independently, however each editor can "call"
the other --i.e. EDITOR-1 can tell EDITOR-2 to start editing OBJECT-X (and
vice versa).

Now, for simplicity, assume that at any time either editor can be in one of
three input-states:
 1] Resting/"Wait for input"
 2] Waiting for CLIM-like type-in (e.g. in the middle of an ACCEPT.)
 3] In some other, possibly MOTIF-like modal state --for example with a
    menu or a dialog box popped-up.

Case #1 is uninteresting, but suppose EDITOR-1 is in one of the other
"wait" states and EDITOR-2 sends it a EDIT-OBJECT message.  At this point I
would like to be able to abort out of _whatever_ EDITOR-1 is doing and
proceed with the new editing task (again, for simplicity, let's assume that
EDITOR-1 is always in a state where it can be "reasonably" interrupted).

So my questions:

  I] Is there some way that I can force EDITOR-1 to abort out of whatever
state it is in?  It is OK if it blows all the way out to the outer command-
loop --provided first, that I can do it functionally from the outside and
second, it works in all cases, whether CLIM-like (e.g. where the editor is
in the middle of an ACCEPT) or MOTIF-like (e.g. where the editor is waiting
for some dialog-box, like that of NOTIFY-USER).

 II] Is there some way I can functionally determine the wait-state of
EDITOR-1 from the outside (that is, that can I do in a global way that
doesn't involve, say, having set my own internal flag before I went into a
wait state)?

III] An alternative approach would be the following: before I put EDITOR-1
in a wait-state I notify EDITOR-2, at which time EDITOR-2 "locks-up",
rejecting all input, until EDITOR-1 is finished.  This is ugly, but
do-able.  So here my question is: Is there some way to cause EDITOR-2 to
(temporarily) reject _all_ input both CLIM-like (i.e. presentation-actions
or command accelerators) or MOTIF-like (e.g. from a menu-bar)?  Again it
would be nice for this to be done in a global way; i.e. in a way that
doesn't involve, say, having each individual command check a REJECT-P flag.

To preempt one line of attack, this can't be based on ACTIVITIES (in part
because the editor-frames have to be otherwise independent).

Any suggestions/comments?

Thanks
Nichael


Main Index | Thread Index