CLIM mail archive
[Prev][Next][Index][Thread]
problem with accept
Date: Wed, 15 Jul 1992 12:20 EDT
From: Tom Trinko <ttrinko@dipl.rdd.lmsc.lockheed.com>
Mark:
This is the code which seems to have a problem
(defun menu (stream)
(accepting-values (stream :own-window t
:label "abc")
(accept 'string :stream stream :prompt t)))
when I execute this I see the following problem.
click on the string value to enter it
start typing
when you hit 35 characters or so--including the prompt-- the
text wraps to the next line even though there is plenty of space to the right. In our full application we see that if the prompt is
> 35 characters long the everything the user types appears on the
next line. We also see the "no" option from accept 'boolean
appearing on the next line. Am i doing something stupid or is
this a real bug? Thanks for any help
I came up with a workaround for this, but forgot to report the problem. The
problem is that the stream-text-margin is not set and the default is 35.
Here's code that works for us. Notice the first line within the
accepting-values is (setf (stream-text-margin ...). This is what does the fix
and it must be able to access the stream, so using t as a value for stream in
accepting-values doesn't work. We just bind stream to (frame-top-level-window
*application-frame*).
(let ((stream (frame-top-level-window *application-frame*)))
(clim:accepting-values (stream :own-window
'(:right-margin (20 :character)
:bottom-margin (5 :character))
:label
"Change existing object or create new one")
(setf (stream-text-margin stream) (window-inside-width stream))
(setf change?
(accept '(member :yes :no)
:prompt
(format nil "Change existing object named ~A" name)
:default :no
:stream stream))))
References:
Main Index |
Thread Index