perhaps you'll find some usefull information at
and/or
Matthias Hoffmann
________________________________________
Von: starkit group [nor...@googlegroups.com]
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
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 <jo...@wexfordpress.com>:
>
> 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 sta...@googlegroups.com or visit http://groups.google.com/group/starkit?hl=en
To unsubscribe from this group, send email to starkit+u...@googlegroups.com
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 ab...@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en