tcltk-app.lsp

Started by newdep, May 22, 2005, 02:45:35 AM

Previous topic - Next topic

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

#1
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))