CLIM mail archive

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

Multiprocessing and multi windows



    Date: Thu, 23 Sep 1993 19:11 EDT
    From: David Perkovic <dip@mod.dsto.gov.au>

    A few weeks back I emailed to the group about how I could go about having
    multiple windows active at the same time.  The only response I received
    suggested using multiprocesses which I have tried but have come across
    another problem.

    Before I continue I'll just go over what I'm trying to do.  I have a number
    of units on a window which I want to select and open up another window
    which displays the units contents.  The problem is I need to then leave the 
    window open and go back and open another window and displays its contents and
    so on.  I thought there should be a way to change the focus of the window
    and but since nobody replied I assume I can't :-(

Use multiple windows that share the same I/O buffer.  You can do this
by SETFing STREAM-INPUT-BUFFER (I think that's what it's called in
CLIM 1.1); in CLIM 2.0, the same hack works using SHEET-EVENT-QUEUE.

You can change the focus by using STREAM-SET-INPUT-FOCUS.

I wish people would get in the habit of using the APROPOS function to
find functionality like this, in CLIM as well as in other tools.  Most
of the names chosen in CLIM are not in any way wierd or obscure.  Ditto
for most other tools I know of.

    I now open up multiple windows using multiple processes but have a problem when
    resizing the windows.  I have variables local to each procedure and when 
    clim tries to redraw the window it redraws it in what ever process is 
    currently active so that what is redrawn is the contents of another window 
    that is active or it crashes as its in the main (or initial) process and the 
    variables it needs are undefined.

    ie when I resize the window it performs the redraw method within what ever
    process is currently active and doesn't use the variables associated with
    the right window.

Presumably it is using the per-process state.  I don't think using
multiple processes is called for here, at least not from what you
describe.

    So is there any way to obtain what window is being resized or another
    way to go about it?


    BTW I'm using Lucid Common Lisp 4.0 and Clim 1.1 on a SparcStation running
    Open Windows.

    Thanks

    David


References:

Main Index | Thread Index