CLIM mail archive
[Next][Index][Thread]
problems with type specifier of the clim::accept function
Date: Thu, 14 Nov 1991 17:45+0200
From: "(Berthe Y. Choueiry)" <choueiry@liasun1.epfl.ch>
Hi,
I am using Allegro 4.1.beta, CLIM 1.0 and X11R5 on a Sparc station
I don't know whether this question has been asked before and whether it
is a bug at all. When the type specifier in the clim::accept funtion
is 'symbol, the following works fine but it does not if I try to
accept a sequence of symbols '(sequence symbol) as indicated in 17.5.6
page 166 in the CLIM manual. Hitting any keep does only produce a beep
sound..Has anybody encountered the same problem? Am I doing anything wrong? Any
help is appreciated!
Thanks,
-Berthe
choueiry@liasun1.epfl.ch
LIA, CM1-618 (MA), DI, Ecole Polytechnique Federale de Lausanne, Ecublens
CH-1015 Lausanne, Switzerland
Voice: +41-21- 693 52 77 Fax: +41-21- 693 52 25
Note: The following refers to smbx CLIM, but should be true for AllegroCL as well.
I think you problem is not the presentation type specifier, but instead
the stream argument you forgot to provide in the call to accept.
The following code (embedded in yours) works fine:
(define-bug-command (Enter-item-list :menu t) ()
(let ((stream *standard-output*)
(result '(a b c)))
(accepting-values
(stream
:own-window '(:right-margin (25 :character))
:x-position 100 :y-position 50
:label "Enter list of items:")
(flet ((get-list (value id STREAM)
(accept '(sequence symbol)
:query-identifier id
:default value
:STREAM STREAM
:prompt nil)))
(format stream "~&Enter list of items: ")
(setf result (get-list result 'result STREAM))
(fresh-line stream)
(terpri stream)))
(format stream "~% ~a" result)))
You should keep in mind that accept works by default on the *standard-input*/ouput* stream,
so when you cause accepting values to open its own window, your accept will wait for input
on the wrong stream.
Furthermore, as a style hint, you should consider get-list to be defined outside the accepting-values body,
because this is run more than once, in fact it's run each time you input something.
bye,
Markus Fischer
Main Index |
Thread Index