CLIM mail archive


problems with clim:open-window-stream

[Platforms: Lucid CLIM 1.0/Allegro CLIM 1.1 with CLX on Sparc; using an NCD X Display]

I've got some problems with clim:open-window-stream: some of the arguments are
not recognized (or, at least not evaluated). :borders,
:top/:left/:right/:bottom/:widht/:height have no visible effect (but :scroll-bars
works). This problem occurred both with Lucid's CLIM as well as with Allegro. 

Running the macro below several times with the root window as the parent, the
window is displayed at the root windows "pointer position" (not the 'real'
pointer position, but a clim-internal value which is not affected by pointer
motions [why?] -- initially the upper left corner), which is altered by the the
output functions (so that another call to open-window-stream puts the window to
the altered position -- finally, all windows are displayed in the lower right
corner of the screen...). Trying to do a (clim:stream-set-pointer-position*
*clim-root* 400 400) informs me that no generic method exists for these
arguments. In other words, I can't display a window where I want to -- window
system basics don't work.

The :borders argument doesn't work either -- but at least, I have scrollbars for
my 2-line user message.

When calling the macro while an application frame is running (for example, the
clim-demo lisp listener), the temporary window *is* displayed at the "real"
pointer position (WOW), but still without borders (hmm). When the :parent is the
top-level-window of the clim:*application-frame*, the window is displayed *with*
borders (finally!), but not with the correct :widht/:height values specified in the

OK. So far, the :left/:right/:top/:bottom-stuff doesn't seem to have  the slightest
effect on the position of the window. The :borders argument seems only to work
when the :parent is a running application frame. 

I don't need workarounds for the deficiencies of clim:open-window-stream. I need
it with the functionality specified in the manual (and don't let me hear that it
works with Genera...). The various CLIM vendors didn't have much work with their
manuals, so at least they could provide a manual supplement with
implementation-specific bugs and shortcomings. CLIM will not keep the friends it
has (and deserves) when the implementations are so buggy that you have to spend
more time in ("non-portable"!) bug-fixes and workarounds than in the interface



(defmacro test-dialog (format-string &rest args &key (parent *clim-root*))
  `(let ((menu-window (clim:open-window-stream :parent ,parent
					       :scroll-bars nil
					       :borders t
					       :left 500 :width 250
					       :top 400 :height 200))
	 (answer nil))
    (clim::menu-choose-from-drawer menu-window 'clim::menu-item
     #'(lambda (stream type)
	 (clim:format stream ,format-string ,@args)
	 (clim:terpri stream)
	 (clim:terpri stream)
	 (clim:present " Yes "
		       :sensitive t
		       :stream stream)
	 (clim:present " No "
		       :sensitive t
		       :stream stream)))))



Main Index | Thread Index