CLIM mail archive

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

problems with type specifier of the clim::accept function



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


;;;;;;;;; The following doesn't work,

;;; -*- Package: USER; Mode: LISP; Base: 10; Syntax: Common-Lisp -*-

(in-package "USER")
(use-package "CLIM")

(define-application-frame bug ()
  ()
  (:panes ((time-line :application
                      :incremental-redisplay t
                      :scroll-bars :both)
;                      :display-function 'display-time-line
	   (menu :command-menu
		 :default-text-style '(:serif :bold :small))))
  (:layout ((time-layout
	     (:column 1
		      (menu :compute)
		      (time-line :rest))))))

(define-bug-command (Enter-item-list :menu t) ()
  (let ((stream *standard-output*)
	(result nil))
    (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)
	      (accept '(sequence symbol)
		      :query-identifier id
		      :default value
		      :prompt nil)))
       (format stream "~&Enter list of items: ")
       (setf result (get-list result 'result))
       (fresh-line stream)
       (terpri stream)))
    (format stream "~% ~a" result)))

(defun init-bug ()
  (defvar *clim-root* (open-root-window :clx :host
					(subseq  (sys:getenv "DISPLAY") 0 7)))
  (setf bug
    (make-application-frame 'bug
			    :parent *clim-root*
			    :left 200 :right 1000
			    :top 100 :bottom 600))
  (run-frame-top-level bug))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;; The following does work well

;;; -*- Package: USER; Mode: LISP; Base: 10; Syntax: Common-Lisp -*-

(in-package "USER")

(define-application-frame bug ()
  ()
  (:panes ((time-line :application
                      :incremental-redisplay t
                      :scroll-bars :both)
;                      :display-function 'display-time-line
	   (menu :command-menu
		 :default-text-style '(:serif :bold :small))))
  (:layout ((time-layout
	     (:column 1
		      (menu :compute)
		      (time-line :rest))))))

(define-bug-command (Enter-item-list :menu t) ()
  (let ((stream *standard-output*)
	(result nil))
    (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)
	      (accept 'symbol
		      :query-identifier id
		      :default value
		      :prompt nil)))
       (format stream "~&Enter list of items: ")
       (setf result (get-list result 'result))
       (fresh-line stream)
       (terpri stream)))
    (format stream "~% ~a" result)))

(defun init-bug ()
  (defvar *clim-root* (open-root-window :clx :host
					(subseq  (sys:getenv "DISPLAY") 0 7)))
  (setf bug
    (make-application-frame 'bug
			    :parent *clim-root*
			    :left 200 :right 1000
			    :top 100 :bottom 600))
  (run-frame-top-level bug))

0,,


Main Index | Thread Index