John,
Sorry, it was late, I reacted too hastily. That error message looks wild, not sure what to make of it.
Unfortunately, I have no Linux system. But the original developers of LTk use Linux and are looking at Celtk these days. I have not heard from them, but a query on the cells-devel mailing list might turn up someone using both Linux and Celtk.
Otherwise, it might helpt to track down tk-format-now and tweak it so that the branch to display messages sent to Tk always fires, then see (a) if those messages look okay (post them to cells-devel) and (b) how far you get before Celtk dies.
kt
On 4/5/06, John Landahl john@landahl.org wrote:
Right at the top of ltktest-cells-inside.lisp you will find:
#+test-ltktest (progn (cells-reset 'tk-user-queue-handler) ; ...huge comment elided.... (tk-test-class 'ltktest-cells-inside))
Yep, saw that, and I suppose I expected that loading celtk would set test-ltktest. Removing the #+ and re-evaluating does startup the test.
However, the result is a bunch of errors and a big traceback. Here's what looks like the most useful chunk:
0> numparse | :=> 42read-data:UNKNOWNcolor name "systembuttonface"
read-data:INVALIDcommand name ".cv-scroller.test-canvas"
INVALIDCOMMANDNAME.cv-scroller.test-canvasUNKNOWNCOLORNAMEsystembuttonfaceBADWINDOWPATHNAME.cv-scroller.test-canvasINVALIDCOMMANDNAME.cv-scroller.test-canvas.bkg-popINVALIDCOMMANDNAME.cv-scroller.test-canvas.bkg-popINVALIDCOMMANDNAME.cv-scroller.test-canvas.bkg-popINVALIDCOMMANDNAME.cv-scroller.test-canvas.bkg-popCANREAD.cv-scroller.test-canvas.bkg-pop.bkg An error of type READER-ERROR has occured: READER-ERROR on #<TWO-WAY-STREAM :INPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 14" {A755EC9}>
:OUTPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 13" {A755541}>>: illegal terminating character after a colon: #\ 0: (SB-DEBUG:BACKTRACE 536870911 #<SB-SYS:FD-STREAM for "a constant string" {AFCDB01}>) 1: (LTK::TRIVIAL-DEBUGGER #<READER-ERROR {AA34AF1}> #<unavailable argument>) 2: (INVOKE-DEBUGGER #<READER-ERROR {AA34AF1}>) 3: (ERROR READER-ERROR) 4: (SB-IMPL::%READER-ERROR #<TWO-WAY-STREAM :INPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 14" {A755EC9}> :OUTPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 13" {A755541}>> "illegal terminating character after a colon: ~S") 5: (SB-IMPL::READ-TOKEN #<TWO-WAY-STREAM :INPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 14" {A755EC9}> :OUTPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 13" {A755541}>> #:) 6: (READ-PRESERVING-WHITESPACE #<TWO-WAY-STREAM :INPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 14" {A755EC9}> :OUTPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 13" {A755541}>> NIL NIL T) 7: (READ-PRESERVING-WHITESPACE #<TWO-WAY-STREAM :INPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 14" {A755EC9}> :OUTPUT-STREAM #<SB-SYS:FD-STREAM for "descriptor 13" {A755541}>> NIL NIL NIL) 8: (LTK::MAIN-ITERATION :BLOCKING T) 9: ((LAMBDA ())) 10: ((LABELS LTK::USE-DEBUGGER) #<FUNCTION LTK::TRIVIAL-DEBUGGER> #<CLOSURE (LAMBDA #) {AA3477D}>) 11: (LTK:MAINLOOP :SERVE-EVENT NIL)
I'm running SBCL 0.9.11 on Linux, if it matters. My Tk version is 8.4.
No, but do compare it to 'ltktest-cells-inside to get a feel for how Cells transforms development.
I definitely will. I'd very much like to do more declarative programming where it makes sense, and (as you and others have pointed out) UIs are a natural fit. So it will be good to compare your approach to the more usual (less intelligent) approach. -- John Landahl john@landahl.org http://landahl.org/john
I just grabbed the CVS version of Cells and Celtk (I had already changed the latter quite a bit) and tested OK. Here is the output I see to wish84/Tk:
tk> menu .mnu75 -tearoff 0 -type menubar tk> menu .mnu75.mnu78 -tearoff 0 tk> menu .mnu75.mnu78.mnu92 -tearoff 0 tk> frame .cv-scroller -class frame tk> canvas .cv-scroller.test-canvas -background systembuttonface -scrollregion {0 0 500 400} tk> senddata [.cv-scroller.test-canvas create text 10 10 -anchor "nw" -text "Ltk Demonstration"] tk> senddata [.cv-scroller.test-canvas create line 250.0 400.0 300.23407 108.66162 155.33328 366.35382 378.16644 172.06824 103.135544 280.50952 398.60135 270.4362 116.8235 180.97812 352.37134 359.63623 190.25645 112.41109 260.21606 399.6517 290.49127 105.5685 163.47768 372.5312 372.56125 163.52028 105.55452 290.44135 399.64813 260.26807 112.43175 190.2089 359.60065 352.40945 181.02466 116.79939 270.38467 398.60843 280.56073 103.14618 172.02382 378.13943 366.38678 155.37381 108.64426 300.18518 400.0 250.05157 108.67917 199.71655 366.32098 344.7071 172.11243 121.80669 280.45807 396.87512 270.48798 101.40578 180.93207 383.15262 359.67145 147.66635 112.39021 309.69543 399.65524 239.83597 105.582504 209.45882 372.50076 336.56537 163.5629 127.40871 290.3911 394.45953 260.31952 100.35539 190.16055 387.54724 352.44757 140.43495 116.77568 318.92953 398.6156 229.66756 ] tk> scrollbar .cv-scroller.hscroll -command ".cv-scroller.test-canvas xview" -orient "horizontal" tk> scrollbar .cv-scroller.vscroll -command ".cv-scroller.test-canvas yview" -orient "vertical" tk> frame .f76 -padx 0 -pady 0 -class frame tk> frame .f76.f79 -borderwidth 2 -padx 0 -pady 0 -relief sunken -class frame tk> label .f76.f79.lbl96 -text "Rotation:" tk> button .f76.f79.b97 -text "Start" -command {callback ".f76.f79.b97.CMD"} tk> button .f76.f79.b98 -text "Stop" -command {callback ".f76.f79.b98.CMD"} tk> button .f76.b80 -text "Hallo" -command {callback ".f76.b80.CMD"} tk> button .f76.b81 -text "Welt!" -command {callback ".f76.b81.CMD"} tk> frame .f76.f82 -borderwidth 2 -padx 0 -pady 0 -relief sunken -class frame tk> label .f76.f82.lbl99 -text "Test:" tk> button .f76.f82.b100 -text "OK:" -command {callback ".f76.f82.b100.CMD"} tk> entry .f76.point-ct -background systembuttonface -textvariable ".f76.point-ct" tk> button .f76.b83 -text "Print" -command {callback ".f76.b83.CMD"} tk> button .f76.b84 -text "Reset" -command {callback ".f76.b84.CMD"} tk> menu .cv-scroller.test-canvas.bkg-pop -tearoff 0 tk> .mnu75 add cascade -menu ".mnu75.mnu78" -label "File" tk> .mnu75.mnu78 add command -command {callback "..MNU90"} -label "Load" tk> .mnu75.mnu78 add command -command {callback "..MNU91"} -label "Save" -state normal tk> .mnu75.mnu78 add separator tk> .mnu75.mnu78 add cascade -menu ".mnu75.mnu78.mnu92" -label "Export..." tk> .mnu75.mnu78 add separator tk> .mnu75.mnu78 add command -accelerator "Alt-q" -command "exit" -label "Quit" -underline 1 tk> .mnu75.mnu78.mnu92 add command -command {callback "..MNU101"} -label "jpeg" tk> .mnu75.mnu78.mnu92 add command -command {callback "..MNU102"} -label "png" tk> .cv-scroller.test-canvas.bkg-pop add radiobutton -variable ".cv- scroller.test-canvas.bkg-pop.bkg" -value "red" -command {callback ".cv- scroller.test-canvas.bkg-pop.0.CMD"} -label "Crimson Tide" tk> .cv-scroller.test-canvas.bkg-pop add radiobutton -variable ".cv- scroller.test-canvas.bkg-pop.bkg" -value "yellow" -command {callback ".cv- scroller.test-canvas.bkg-pop.1.CMD"} -label "Oak Tree Ribbon" tk> .cv-scroller.test-canvas.bkg-pop add radiobutton -variable ".cv- scroller.test-canvas.bkg-pop.bkg" -value blue -command {callback ".cv- scroller.test-canvas.bkg-pop.2.CMD"} -label "Sky" tk> .cv-scroller.test-canvas.bkg-pop add radiobutton -variable ".cv- scroller.test-canvas.bkg-pop.bkg" -value systembuttonface -command {callback ".cv-scroller.test-canvas.bkg-pop.3.CMD"} -label "Factory" tk> set .f76.point-ct "42" tk> set .cv-scroller.test-canvas.bkg-pop.bkg tk> bind . <Alt-q> {.mnu75.mnu78 invoke 5} tk> trace add variable .f76.point-ct write "trc2 .f76.point-ct.TRACEWRITE" tk> . configure -menu .mnu75 tk> grid .cv-scroller.test-canvas -row 0 -column 0 -sticky news tk> grid .cv-scroller.hscroll -row 1 -column 0 -sticky we tk> grid .cv-scroller.vscroll -row 0 -column 1 -sticky ns tk> grid columnconfigure .cv-scroller 0 -weight {1} tk> grid columnconfigure .cv-scroller 1 -weight {0} tk> grid rowconfigure .cv-scroller 0 -weight {1} tk> grid rowconfigure .cv-scroller 1 -weight {0} tk> pack .f76.f79.lbl96 .f76.f79.b97 .f76.f79.b98 -side left -anchor nw -padx 0 -pady 0 tk> pack .f76.f82.lbl99 .f76.f82.b100 -side left -anchor nw -padx 0 -pady 0 tk> pack .f76.f79 .f76.b80 .f76.b81 .f76.f82 .f76.point-ct .f76.b83 .f76.b84 -side left -anchor nw -padx 0 -pady 0 tk> pack .cv-scroller -side top -fill both -expand 1 tk> pack .f76 -side bottom tk> .cv-scroller.test-canvas configure -xscrollcommand ".cv-scroller.hscrollset" tk> .cv-scroller.test-canvas configure -yscrollcommand ".cv-scroller.vscrollset" tk> wm deiconify . tk> tk_popup .cv-scroller.test-canvas.bkg-pop 120 212
ken