utz82 / pstk Goto Github PK
View Code? Open in Web Editor NEWA Portable Scheme Interface to the Tk GUI Toolkit
License: BSD 2-Clause "Simplified" License
A Portable Scheme Interface to the Tk GUI Toolkit
License: BSD 2-Clause "Simplified" License
Not an issue, just HOW TO.
(tk-start "wish -geometry 300x200")
I found this because on XMonad, changing window geometry by xdotool or python's xlib just doesn't work. Also, adding widgets or using "wm geometry . 400x300" doesn't resize at all.
Is there any way of getting properties of widget for resetting these? For example changing the text of a button after packing it? Also is there a way of tracking created widgets? a table where things are being saved?
I think i am able to import pstk on Linux, but running (tk-start) throws:
#;10> (tk-start)
can't find package Tk
An error occurred inside Tcl/Tk
wm protocol . WM_DELETE_WINDOW {callToScm g1}
--> invalid command name "wm"
Again by evaluating (tk-start "tclsh8.4") (as i have chicken 5 in Emacs with the Geiser mode) i get the following error:
(tk-start "tclsh8.4")
=> Error: (string-append) "bad argument type - not a string": (#!eof)
Call history:
(geiser-eval (quote #f) (quote (tk-start "tclsh8.4")))
(write-to-log form)
(geiser-chicken-use-debug-log)
(call-with-result thunk)
((call-with-current-continuation63 (##core#lambda (k61) (chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62))))))))))
(call-with-current-continuation63 (##core#lambda (k61) (chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))))))
(chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))))
(##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))
(with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))
(with-output-to-string (lambda () (with-error-output-to-port (current-output-port) thunk)))
(with-error-output-to-port (current-output-port) thunk)
(current-output-port)
(call-with-values thunk (lambda v (set! result v)))
(eval form)
(tk-start "tclsh8.4")
(tk-start "tclsh8.4")
Error: (string-append) "bad argument type - not a string": (#!eof)
Call history:
(geiser-eval (quote #f) (quote (tk-start "tclsh8.4")))
(write-to-log form)
(geiser-chicken-use-debug-log)
(call-with-result thunk)
((call-with-current-continuation63 (##core#lambda (k61) (chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62))))))))))
(call-with-current-continuation63 (##core#lambda (k61) (chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))))))
(chicken.condition#with-exception-handler (##core#lambda (exn) (k61 (##core#lambda () (with-all-output-to-string (lambda () (write-exception exn)))))) (##core#lambda () (##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))))
(##sys#call-with-values (##core#lambda () (with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))) (##core#lambda args62 (k61 (##core#lambda () (##sys#apply ##sys#values args62)))))
(with-all-output-to-string (lambda () (call-with-values thunk (lambda v (set! result v)))))
(with-output-to-string (lambda () (with-error-output-to-port (current-output-port) thunk)))
(with-error-output-to-port (current-output-port) thunk)
(current-output-port)
(call-with-values thunk (lambda v (set! result v)))
(eval form)
(tk-start "tclsh8.4")
(tk-start "tclsh8.4")
(wish (string-append
"evalCmdFromScm \""
(string-translate cmd
'((#\\ . "\\\\") (#\" . "\\\"")))
"\""))
=>
(wish (string-append
"evalCmdFromScm \""
(string-translate cmd
'((#\\ . "\\\\") (#\" . "\\\"")))
"\"\n"))
(display "scheme->wish: ")
(display argument)
(newline)))
(display argument wish-input)
(newline wish-input)
=>
(display "scheme->wish: ")
(display argument)))
(display argument wish-input)
If I really want to run two cmds at the same time, the two input commands will than never mix up, assume the scheme implements ports right.
There may still be issues with the output though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.