From: Jeffrey A. <jan...@la...> - 2004-08-30 19:23:51
|
hello, I am new to CLX and developing X11 with LISP. I've been following a CLX Manual that I found at the CLiki site and tried doing a couple of examples. However, I get a "*** - SYSTEM::%EXPAND-FORM: (DRAWABLE-DISPLAY MW) should be a lambda expression" message back and just to make sure I typed the right thing in, I copy and pasted the example code. I still get the above message. Is there anything I am missing that the CLX manual fails to tell me or perhaps that I misread? My version of CLISP is as follows: GNU CLISP 2.33.2 (2004-06-02) (built on loiso [127.0.0.1]) Platform OS is SuSE 9.1 Kernel 2.6.5-7.104 Thanks very much for the help. Jeff |
From: Sam S. <sd...@gn...> - 2004-08-30 19:39:08
|
> * Jeffrey Andrews <wnaqerjf@ynapbcr.pbz> [2004-08-30 15:23:10 -0400]: > > I am new to CLX and developing X11 with LISP. > I've been following a CLX Manual that I found at > the CLiki site and tried doing a couple of examples. > However, I get a > "*** - SYSTEM::%EXPAND-FORM: (DRAWABLE-DISPLAY MW) should be a lambda > expression" > message back and just to make sure I typed the right thing in, I copy > and pasted the example code. I still get the above message. so what did you copy and paste? (and what is the CLiki page URL?) -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> Politically Correct Chess: Translucent VS. Transparent. |
From: Jeff A. <je...@qu...> - 2004-08-30 19:45:57
|
http://www.cliki.net/CLX and the manual it links to is: http://www.stud.uni-karlsruhe.de/~unk6/clxman/ and the section of code is: (If there is a better tutorial, let me know) (defun menu-choose (menu x y) ;; Display the menu so that first item is at x,y. (menu-present menu x y) (let ((items (menu-item-alist menu)) (mw (menu-window menu)) selected-item) ;; Event processing loop (do () (selected-item) (EVENT-CASE ((DRAWABLE-DISPLAY mw) :force-output-p t) (:exposure (count) ;; Discard all but final :exposure then display the menu (when (zerop count) (menu-refresh menu)) t) (:button-release (event-window) ;;Select an item (setf selected-item (second (assoc event-window items))) t) (:enter-notify (window) ;;Highlight an item (menu-highlight-item menu (find window items :key #'first)) t) (:leave-notify (window kind) (if (eql mw window) ;; Quit if pointer moved out of main menu window (setf selected-item (when (eq kind :ancestor) :none)) ;; Otherwise, unhighlight the item window left (menu-unhighlight-item menu (find window items :key #'first))) t) (otherwise () ;;Ignore and discard any other event t))) ;; Erase the menu (UNMAP-WINDOW mw) ;; Return selected item string, if any (unless (eq selected-item :none) selected-item))) On Mon, 2004-08-30 at 15:38, Sam Steingold wrote: > > * Jeffrey Andrews <wnaqerjf@ynapbcr.pbz> [2004-08-30 15:23:10 -0400]: > > > > I am new to CLX and developing X11 with LISP. > > I've been following a CLX Manual that I found at > > the CLiki site and tried doing a couple of examples. > > However, I get a > > "*** - SYSTEM::%EXPAND-FORM: (DRAWABLE-DISPLAY MW) should be a lambda > > expression" > > message back and just to make sure I typed the right thing in, I copy > > and pasted the example code. I still get the above message. > > so what did you copy and paste? > (and what is the CLiki page URL?) |
From: Sam S. <sd...@gn...> - 2004-08-30 20:48:29
|
> * Jeff Andrews <wrsserl@dhnpxrewnpx.pbz> [2004-08-30 15:45:20 -0400]: > > http://www.cliki.net/CLX there is no code for MENU-CHOOSE on this page. > and the manual it links to is: > http://www.stud.uni-karlsruhe.de/~unk6/clxman/ there is no code for MENU-CHOOSE on this page either. > (defun menu-choose (menu x y) > ;; Display the menu so that first item is at x,y. > (menu-present menu x y) > > (let ((items (menu-item-alist menu)) > (mw (menu-window menu)) > selected-item) > > ;; Event processing loop > (do () (selected-item) > (EVENT-CASE ((DRAWABLE-DISPLAY mw) :force-output-p t) > (:exposure > (count) > ;; Discard all but final :exposure then display the menu > (when (zerop count) (menu-refresh menu)) > t) > > (:button-release > (event-window) > ;;Select an item > (setf selected-item (second (assoc event-window items))) > t) > > (:enter-notify > (window) > ;;Highlight an item > (menu-highlight-item menu (find window items :key #'first)) > t) > > (:leave-notify > (window kind) > (if (eql mw window) > ;; Quit if pointer moved out of main menu window > (setf selected-item (when (eq kind :ancestor) :none)) > ;; Otherwise, unhighlight the item window left > (menu-unhighlight-item menu (find window items :key #'first))) > t) > > (otherwise > () > ;;Ignore and discard any other event > t))) > > ;; Erase the menu > (UNMAP-WINDOW mw) > > ;; Return selected item string, if any > (unless (eq selected-item :none) selected-item))) you need to (use-package "XLIB") before evaluating this code. -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> In C you can make mistakes, while in C++ you can also inherit them! |