sharplispers / clx

a fork of crhodes' fork of danb's fork of the CLX library, an X11 client for Common Lisp
Other
116 stars 46 forks source link

cltcl #133

Closed saufesma closed 5 years ago

saufesma commented 5 years ago

Hello there

Today I try cltcl, looks fine when you run following code

(in-package "CL-USER")

(defun window (&KEY (INTERPRETER CLTCL:INTERPRETER) OPTIONS) "Runs the Common Lisp window." (cltcl:event-loop (viewer) :interpreter interpreter :options options))

(defun viewer ()

TCL[

package require Tk namespace import ::cltcl::callLisp

label .label1 -text "Sum of" entry .a -width 6 -relief sunken -textvariable a entry .b -width 6 -relief sunken -textvariable b label .label2 -text "Result" label .s -textvariable s pack .label1 .a .b .label2 .s -side left -padx 1m -pady 2m bind .a {set s [callLisp sum $a $b]} bind .b {set s [callLisp sum $a $b]}])

(defun sum (a b) (+ a b))

when I type in number 1 in entry and press Enter this happens The value "1" is not of type NUMBER [Condition of type TYPE-ERROR] tcl treats everything like strings but how to convert it to number for function sum, any ideas. Regards

dkochmanski commented 5 years ago

cltcl is not part of clx project. please report problems with it in its own tracker. closing this as irrelevant to this project.