On 5/23/06, Stu Glaser stuglaser@gmail.com wrote:
Hi all,
I'm trying to get Celtk working on SBCL. I've attached a patch with several bugfixes.
Thx for the patches. I will start working thru them and update CVS shortly. speaking of which, not sure what you mean by not having anonymous CVS, but I am a CVS dummy. I just use TortoiseCVS on win32 and I have write access so... well, like I said, i do not know a thing about CVS, not sur ehow to help.
Much still does not work, however, I have managed to
display the "one-button-window" demo (though it crashes immediately after display.
Without you doing anything? And it takes out your Lisp session as well, or do you get a backtrace?
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.
Well, almost everything happens in "finish-business", so I would not worry about Cells as much as OS differences and Lisp differences and installation issues (as you have been).
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.
Looking here: http://tmml.sourceforge.net/doc/tk/canvas.html, I do not see a -file configuration option on the Bitmap Canvas item (you have to scroll waaaay down under the Canvas widget to find the items. Which explains....
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.
I think what happened is that you just made Tcl break sooner. ie, before it saw the (correct, I think) -bitmap option and then died when it decided the file was not "defined" (strange, it should say found, right? I will investigate over trying to recreate your error.
So let's go back to that weird <file location> "not defined". I have a hunch but prefer to investigate first. meanwhile, a couple of things for you to try:
1. naturally, make sure the file is there. :) I am not sure I even had that .xbm file in the distro until recently.
2. find the function tk-format-now and monkey with the debug stuff so that any message to Tk with the word "bitmap" in it gets printed, and see if you can catch the output and post that. When really confused I rig that so it prints everything, but on lotsa-widgets that would be a lot. if you are brave you can try moving Just Enough Code from lotsa-widgets to one-button. But it is probably easiest to use my yes/no filters in tk-format-now to get just the right amount of messaging.
kenny
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)
cells-devel site list cells-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/cells-devel