tcltk-app.lsp

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

tcltk-app.lsp

Post by newdep »

Hi Lutz,

There is someting strange with the Key-binding in your example,
it does not run under linux, when i delete the key-binding line
it works but doe sno exit from newlisp.. Im unable to track the problem..

This works for me (but newlisp does not exit pressing destroy [X] )->

(define (app-example )
(tk "toplevel .appex")
(tk "button .appex.bExit -text Exit -command exit")
(tk "pack .appex.bExit -side top -padx 60 -pady 30"))
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

This works !
somehow you have to destroy the Main . wm and not the child..
Im unable to do an exit on a key-binding directly, via a seperate procedure
it might perhpas work.

(context 'App)

(define (app-example )
(tk "toplevel .appex")
(tk "bind .appex <Control-c> exit")
(tk "bind .appex <Destroy> {destroy .}")
(tk "button .appex.button -text EXIT -command exit")
(tk "pack .appex.button -side top -padx 60 -pady 30"))

(context 'MAIN)

(tk "wm withdraw .")

(App:app-example)
-- (define? (Cornflakes))

Locked