Hi all,
I'm trying to get Celtk working on SBCL. I've attached a patch with
several bugfixes. Much still does not work, however, I have managed to
display the "one-button-window" demo (though it crashes immediately
after display.
Sometime later I will have questions. Celtk still crashes often in
finish-business, and I'm not yet familiar enough with cells to perform
the fixes.
I made a change in item-pictorial that I'm not certain about. In
lotsa-widgets, tcl chokes when I use :bitmap in mk-bitmap:
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "initial thread" {A549481}>:
Tcl error: bitmap "/home/stu/tmp/cells/Celtk/x1.xbm" not defined
I changed it to :file and added a -file entry in deftk bitmap. That
fixed the first error, but created a new one (which occurs later):
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "initial thread" {A549481}>:
Tcl error: unknown option "-file"
I'm not sure how to proceed here. Any help would be great.
Lastly, anonymous CVS access would be great. It would certainly help
for creating patches and for keeping my sources updated.
Regards,
-Stu Glaser
diff -c old-Celtk/composites.lisp Celtk/composites.lisp
*** old-Celtk/composites.lisp Mon May 15 00:15:37 2006
--- Celtk/composites.lisp Tue May 23 04:00:59 2006
***************
*** 85,91 ****
#+wishful (ewish :initarg :ewish :accessor ewish :initform nil :cell nil) ;; vestigial?
(title$ :initarg :title$ :accessor title$
:initform (c? (string-capitalize (class-name (class-of self)))))
! (dictionary :initarg :dictionary :initform (make-hash-table :test 'string-equal) :accessor dictionary)
(tkwins :initform (make-hash-table) :reader tkwins)
(xwins :initform (make-hash-table) :reader xwins)
(callbacks :initarg :callbacks :accessor callbacks
--- 85,91 ----
#+wishful (ewish :initarg :ewish :accessor ewish :initform nil :cell nil) ;; vestigial?
(title$ :initarg :title$ :accessor title$
:initform (c? (string-capitalize (class-name (class-of self)))))
! (dictionary :initarg :dictionary :initform (make-hash-table :test 'equalp) :accessor dictionary)
(tkwins :initform (make-hash-table) :reader tkwins)
(xwins :initform (make-hash-table) :reader xwins)
(callbacks :initarg :callbacks :accessor callbacks
diff -c old-Celtk/item-pictorial.lisp Celtk/item-pictorial.lisp
*** old-Celtk/item-pictorial.lisp Tue May 2 01:57:22 2006
--- Celtk/item-pictorial.lisp Tue May 23 04:00:59 2006
***************
*** 31,36 ****
--- 31,37 ----
-activebackground
-disabledbackground
-bitmap
+ -file
-activebitmap
-disabledbitmap
-foreground
diff -c old-Celtk/run.lisp Celtk/run.lisp
*** old-Celtk/run.lisp Tue May 16 19:40:55 2006
--- Celtk/run.lisp Tue May 23 04:00:59 2006
***************
*** 39,45 ****
(tk-app-init *tki*)
(tk-togl-init *tki*)
(tk-format-now "proc TraceOP {n1 n2 op} {event generate $n1 <<trace>> -data $op}")
! (tcl-create-command *tki* "do-on-command" (get-callback 'do-on-command) 42 0)
(with-integrity ()
(setf *tkw* (make-instance root-class))
--- 40,46 ----
(tk-app-init *tki*)
(tk-togl-init *tki*)
(tk-format-now "proc TraceOP {n1 n2 op} {event generate $n1 <<trace>> -data $op}")
! (tcl-create-command *tki* "do-on-command" (get-callback 'do-on-command) 42 (null-pointer))
(with-integrity ()
(setf *tkw* (make-instance root-class))
***************
*** 85,88 ****
(force-output *tkw*)
(setf *tkw* nil))
! (run-window root-class))
\ No newline at end of file
--- 86,89 ----
(force-output *tkw*)
(setf *tkw* nil))
! (run-window root-class))
diff -c old-Celtk/tk-events.lisp Celtk/tk-events.lisp
*** old-Celtk/tk-events.lisp Tue May 16 19:40:55 2006
--- Celtk/tk-events.lisp Tue May 23 04:00:59 2006
***************
*** 35,41 ****
(tkwin :pointer)
(mask :int)
(proc :pointer)
! (client-data :int))
(defcenum tk-event-type ;; do not try to generate masks from these!
"Ok for interpreting type field in event, but not for (expt 2 etype) to get mask"
--- 35,41 ----
(tkwin :pointer)
(mask :int)
(proc :pointer)
! (client-data :pointer))
(defcenum tk-event-type ;; do not try to generate masks from these!
"Ok for interpreting type field in event, but not for (expt 2 etype) to get mask"
diff -c old-Celtk/tk-interp.lisp Celtk/tk-interp.lisp
*** old-Celtk/tk-interp.lisp Tue May 16 16:17:15 2006
--- Celtk/tk-interp.lisp Tue May 23 04:00:59 2006
***************
*** 36,50 ****
(define-foreign-library Tcl
(:darwin (:framework "Tcl"))
! (:windows (:or "/tcl/bin/Tcl85.dll")))
(define-foreign-library Tk
(:darwin (:framework "Tk"))
! (:windows (:or "/tcl/bin/tk85.dll")))
;; Togl
(define-foreign-library Togl
(:darwin (:or "/opt/tcltk/togl/lib/Togl1.7/libtogl1.7.dylib"))
! (:windows (:or "/tcl/lib/togl/togl17.dll")))
(defctype tcl-retcode :int)
--- 36,57 ----
(define-foreign-library Tcl
(:darwin (:framework "Tcl"))
! (:windows (:or "/tcl/bin/Tcl85.dll"))
! (:unix "libtcl.so")
! (t (:default "libtcl")))
(define-foreign-library Tk
(:darwin (:framework "Tk"))
! (:windows (:or "/tcl/bin/tk85.dll"))
! (:unix "libtk.so")
! (t (:default "libtk")))
;; Togl
(define-foreign-library Togl
(:darwin (:or "/opt/tcltk/togl/lib/Togl1.7/libtogl1.7.dylib"))
! (:windows (:or "/tcl/lib/togl/togl17.dll"))
! (:unix "/usr/lib/Togl1.7/libTogl1.7.so"))
!
! (use-foreign-library Togl)
(defctype tcl-retcode :int)
***************
*** 233,239 ****
(defun argv0 ()
#+allegro (sys:command-line-argument 0)
! #+lispworks (nth 0 (io::io-get-command-line-arguments)))
(defun tk-interp-init-ensure ()
(unless *initialized*
--- 240,247 ----
(defun argv0 ()
#+allegro (sys:command-line-argument 0)
! #+lispworks (nth 0 (io::io-get-command-line-arguments))
! #+sbcl (nth 0 sb-ext:*posix-argv*))
(defun tk-interp-init-ensure ()
(unless *initialized*
diff -c old-Celtk/widget.lisp Celtk/widget.lisp
*** old-Celtk/widget.lisp Tue May 16 19:40:55 2006
--- Celtk/widget.lisp Tue May 23 04:00:59 2006
***************
*** 78,84 ****
(defun tk-create-event-handler-ex (widget callback-name &rest masks)
(let ((self-tkwin (widget-to-tkwin widget)))
! (assert (plusp self-tkwin))
(trc nil "setting up widget virtual-event handler" widget :tkwin self-tkwin)
(tk-create-event-handler self-tkwin
(apply 'foreign-masks-combine 'tk-event-mask masks)
--- 78,84 ----
(defun tk-create-event-handler-ex (widget callback-name &rest masks)
(let ((self-tkwin (widget-to-tkwin widget)))
! (assert (not (null-pointer-p self-tkwin)))
(trc nil "setting up widget virtual-event handler" widget :tkwin self-tkwin)
(tk-create-event-handler self-tkwin
(apply 'foreign-masks-combine 'tk-event-mask masks)