AW: starkit - 2 new messages in 2 topics - digest
Matthias Hoffmann <[email protected]> Tue, 21 Apr 2009 16:05:09 +0200
| Newsgroups | gmane.comp.lang.tcl.starkit |
|---|---|
| Message-ID | <5D8033C585369843A0734F7DED16D65F09D7C9A17E@wa101sw087.prod01.hmkintra.de> |
Hello, perhaps you'll find some usefull information at http://wiki.tcl.tk/14944 and/or http://wiki.tcl.tk/14945 Matthias Hoffmann ________________________________________ Von: starkit group [[email protected]] Gesendet: Dienstag, 21. April 2009 11:39 An: starkit digest subscribers Betreff: starkit - 2 new messages in 2 topics - digest starkit http://groups.google.com/group/starkit?hl=en [email protected] Today's topics: * Moving file out of starkit. - 1 messages, 1 author http://groups.google.com/group/starkit/t/cbc3660a3516492a?hl=en * Capturing Command-Q in Darwin tclkits - 1 messages, 1 author http://groups.google.com/group/starkit/t/4fb5eb2262514d1c?hl=en ============================================================================== TOPIC: Moving file out of starkit. http://groups.google.com/group/starkit/t/cbc3660a3516492a?hl=en ============================================================================== == 1 of 1 == Date: Mon, Apr 13 2009 2:42 am From: Pat Thoyts 2009/4/11 John Culleton <[email protected]>: > > In the same tyro.tcl app mentioned earlier I want to move a > file out of the vfs and make it visible to other programs. > I assume I can use a call in my tcl program like > exec cp workfile ../../../ > but if there is a better way I would appreciate some advice. > > Further, I assume the MSWin version would be > exec cp workfile ..\..\..\ > > I can't test this code yet because of the difficulty I > mentioned earlier today. file copy Here is one I use for copying a certificate file (openssl won't read it from the vfs either) proc copy_ca_file {} { global env set path [file join $::tkchat_dir certs.pem] if {![file exists $path]} { return {} } if {[lindex [file system $path] 0] ne "native"} { set new {} foreach var {TEMP TMP TMPDIR} { if {[info exists env($var)] \ && [file isdirectory $env($var)] \ && [file writable $env($var)]} then { set new [file join $env($var) tkchat.pem] break } } if {$new eq {}} { if {[file isdirectory /tmp] && [file writable /tmp]} { set new [file join /tmp tkchat.pem] } else { log::log error "cannot find a tempfile location" return {} } } log::log info "copying certificate collection to $new" file copy -force $path $new return $new } return $path } Pat Thoyts ============================================================================== TOPIC: Capturing Command-Q in Darwin tclkits http://groups.google.com/group/starkit/t/4fb5eb2262514d1c?hl=en ============================================================================== == 1 of 1 == Date: Mon, Apr 20 2009 12:28 am From: irrational I have an application that wants to do some cleaning-up and query user about unsaved changes before quitting. Here is a little test.tcl for doing this -------------------------- # test.tcl package require Tk proc my_exit {} { puts {Drive safely} exit } button .q -text Quit -command my_exit pack .q bind . <Control-q> my_exit bind . <Command-q> my_exit -------------------------- You see my safe exit procedure should run on clicking the Quit button, or typing Control-Q, or Command-Q. On a Mac, running wish test.tcl all quit routes behave as intended. Using tclkits, the button and Control-Q work as expected. However, running tclkit-darwin-univ-aqua test.tcl a Command-Q exits the tclkit without going through my_exit, and running tclkit-darwin-univ test.tcl a Command-Q brings up a dialog as to whether I want to exit X11. Why does this happen, and how do I get the behaviour I want? (Actually I'd be happy with a "how" answer without the "why") K ============================================================================== You received this message because you are subscribed to the Google Groups "starkit" group. To post to this group, send email to [email protected] or visit http://groups.google.com/group/starkit?hl=en To unsubscribe from this group, send email to [email protected] To change the way you get mail from this group, visit: http://groups.google.com/group/starkit/subscribe?hl=en To report abuse, send email explaining the problem to [email protected] ============================================================================== Google Groups: http://groups.google.com/?hl=en