[developers] Lkb topmenu, graphics etc. to work with open source CL tools

John R. Towler jtowler at soncom.com
Fri Feb 12 02:40:37 CET 2016


I don't want to step on any toes, just trying to make this program
work. Making :command-table (lkb-top-command-table)) works to compile.
Experiments on generating an X frame/window follow after that with no
change in the workings of the program.  Open source papers or other
documentation on command-tables in McCLIM would be a help.  I will
learn the material to make this work.


jtowler at soncom.com (John R. Towler) writes:

> Hello,
>
>         I am working on getting an open source compile and build for the
>         Lkb.  I have a compile on sbcl with experimental threads.  I am
>         running into an error of (:command-table something) needing a
>         list as argument.  I have McCLIM and it runs.  It containes an
>         example LispListener which runs and has code like the above
>         (:command-table unquoted-something).  This is the current
>         obstacle.

          I have threads running on sbcl but all of the tests don't
          succeed. The version is from 1.3.1 with my adjustments to the
          runtime code, so it sort of does something with threads.  I
          got cmucl, Jan 2016 snapshot to get past loading lkb.system,
          to dying on src/glue files.  I had to insert in place the
          defsystem 3.6i (or something) from CLOCC.
          extensions:*load-source-types* was added to.  Right now, I
          have a compile with sbcl, and on testing I can get a
          window/frame on the X display with no menus or access to
          commands.  Running set-up-lkb-interation outputs a lot of
          menus/commands changed then returns nil.  Substituting
          (clim:run-frame-top-level (clim:make-application-frame
          'clim-user::lkb-top))  inserted in place of the unless clause
          gives the X frame with no command options, just the lkb-top as
          a window title.  I ran into the memory problem with
          NetBSD-6.1.4, and rebuilt to 7.0 then 6.1.5 to get prologs and
          lisps working.

          I understood the suggestion from A. Copestake to look toward
          LUI.  I obtained the sources and built it tonight, I have the
          book from CSLI now, and don't offhand know where to find the
          top-level commands/code.  I will look. About the CLIM code I
          have the following frustration:

          

This works with :command-table correctly instantiated (a prolog-ism
certainly) and the Listener code runs in sbcl, and clisp.


from mcclim/Apps/Listener/listener.lisp

;;; Listener application frame
(define-application-frame listener (standard-application-frame)
    ((system-command-reader :accessor system-command-reader
			    :initarg :system-command-reader
			    :initform t))
    (:panes (interactor-container
             (make-clim-stream-pane
              :type 'listener-interactor-pane
              :name 'interactor :scroll-bars t
              :default-view +listener-view+))
            (doc :pointer-documentation :default-view +listener-pointer-documentation-view+)
            (wholine (make-pane 'wholine-pane
                                :display-function 'display-wholine :scroll-bars nil
                                :display-time :command-loop :end-of-line-action :allow)))
  (:top-level (default-frame-top-level :prompt 'print-listener-prompt))
  (:command-table (listener
                   :inherit-from (application-commands
                                  lisp-commands
                                  asdf-commands
                                  filesystem-commands
                                  show-commands)
                   :menu (("Listener"   :menu application-commands)
                          ("Lisp"       :menu lisp-commands)
                          ("Filesystem" :menu filesystem-commands)
                          ("Show"       :menu show-commands))))
  (:disabled-commands com-pop-directory com-drop-directory com-swap-directory)
  (:menu-bar t)
  (:layouts (default
	      (vertically ()
                interactor-container
                doc
                wholine))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; This with the :command-table line will produce an X frame with no
;;   menus or prompt.

;; changed to adding the :command-table line without any arguments or keywords
;; comes up with errors about lkb-top-command-table not found

;; McCLIM in commands.lisp says that all command-tables inherit from
;;   the global-command-table but the errors include,
;;

* (clim:run-frame-top-level (clim:make-application-frame 'clim-user::lkb-top))

debugger invoked on a CLIM:COMMAND-TABLE-NOT-FOUND:
  #<COMMAND-TABLE-NOT-FOUND LKB-TOP-COMMAND-TABLE {61F301A9}>

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(CLIM:FIND-COMMAND-TABLE CLIM-USER::LKB-TOP-COMMAND-TABLE :ERRORP T)
0] 0

* (clim-user::set-up-clim-interaction)

debugger invoked on a CLIM:COMMAND-TABLE-NOT-FOUND:
  #<COMMAND-TABLE-NOT-FOUND LKB-TOP-COMMAND-TABLE {62000D19}>

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(CLIM:FIND-COMMAND-TABLE CLIM-USER::LKB-TOP-COMMAND-TABLE :ERRORP T)
0] 0

;;;;;;;;;;;


(define-application-frame lkb-top ()
  (standard-application-frame) 
  (:panes 
   (display
    (outlining (:thickness 1 :record-p t)
      (spacing (:thickness 1 :record-p t)  
	(scrolling (:scroll-bars :both :record-p t)
	  (make-pane 'application-pane
		     :name "lkb-pane"
		     :text-cursor nil
		     :end-of-line-action :allow
		     :borders nil
		     :background +white+
		     :foreground +black+
		     :draw t
		     :record-p t
		     :display-time t))))))
  (:layouts
   (default display))
  (:geometry :width 550 :height 200))
;;  (:command-table (lkb-top-command-table)))

;;;;; how can the non-portable CL and CLIM code for this application
;;      frame be progressively be transformed into the working-ness of
;;      the mcclim/Apps/Listener/listener.lisp code?


Sincerely,
John (R. for false representations of me on the 'net that I
     have heard about) Towler
jtowler at soncom.com




More information about the developers mailing list