CLIM mail archive

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

Re: clim problem




    There is one one main window, with a main menu and several objects;
    the objects are mouse sensitive, so when one is selected, a window
    is opened with some information about the object. Now, the user has
    to discard the window, if he wants to go further. But I would like
    to give the user the ability to have several such windows active
    at the same time. to open some more and to close some others...
    How must I do ?

I have an application which does exactly the same thing -- I get
the parallelism by using the multiprocessing (mp) package in
Allegrocl.  Here is the code I use to invoke or kill the sub-frame
from the main application frame:

	;; 'node-editor' is the sub-application-frame type;
	;; one of its slots; is ne-proc, which holds the running
	;; process, if there is one

	(defmethod run-node-editor ((editor node-editor))
	  (with-slots (ne-proc) editor
	    (cond (ne-proc
		   ;; process already running -- move to top
		   (window-expose (frame-top-level-window editor)))
		  (t
		   ;; no process running -- start one
		   (setf ne-proc
			 (mp:process-run-function 
			  "node-edit" 
			  #'run-frame-top-level editor))))))

	(defmethod close-node-editor ((editor node-editor))
	  (with-slots (ne-proc) editor
	    (when ne-proc
	      (let ((temp ne-proc))
		(setf ne-proc nil)
		(mp:process-interrupt temp #'frame-exit editor)))))

denise
ddraper@cs.washington.edu

0,,


Main Index | Thread Index