Abridged summary of comp.lang.tcl@googlegroups.com - 34 updates in 8 topics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Abridged summary of comp.lang.tcl@googlegroups.com - 34 updates in 8 topics

comp.lang.tcl mailing list
Christian Gollwitzer <[hidden email]>: Dec 16 09:27PM +0100

Am 16.12.17 um 20:43 schrieb Robert Heller:
 
>> to give a notification sound.
 
> There isn't "built in" support for sound. You have to use exec and run an
> external program:
...more
Cecil Westerhof <[hidden email]>: Dec 16 09:28PM +0100


> There isn't "built in" support for sound. You have to use exec and run an
> external program:
 
> exec play --no-show-progress -n synth .25 vol .1
 
I was afraid of that, but it never hurts ...more
Robert Heller <[hidden email]>: Dec 16 02:50PM -0600


> > And may have to wrap it with a test (eg if or switch) using the ::tcl_platform
> > array.
 
> Why are you using ::tcl_platform instead of ${tcl_platform}?
 
The double colon means the global ...more
Cecil Westerhof <[hidden email]>: Dec 16 10:32PM +0100

> Darwin {
> }
> }
 
That makes my live easier. Somewhere else I use:
global tcl_platform
.
.
.
$tcl_platform(user)
 
But in this way I can drop the global. ...more
Brad Lanam <[hidden email]>: Dec 17 11:02AM -0800

On Saturday, December 16, 2017 at 10:59:06 AM UTC-8, Cecil Westerhof wrote:
> command I use is an external command, but I was wondering if I could
> make the script OS independent. ...more
Andreas Leitgeb <[hidden email]>: Dec 17 05:21PM

> ...
 
I guess that was meant for de.sci.mathematik, not for comp.lang.tcl
...more
Luis Alejandro Muzzachiodi <[hidden email]>: Dec 16 04:36PM -0800

Perhaps this help you:
https://stackoverflow.com/questions/13289204/can-you-get-the-proc-name-inside-a-proc
...more
Cecil Westerhof <[hidden email]>: Dec 17 03:27AM +0100


> Perhaps this help you:
> https://stackoverflow.com/questions/13289204/can-you-get-the-proc-name-inside-a-proc
 
In a way that is what I do. Only instead of putting the code in every ...more
Andreas Leitgeb <[hidden email]>: Dec 17 05:14PM

> does not work when you are not in proc. I would expect:
> info level 1
> not to work when the proc is not called from a proc.
 
I suggest re-reading the doc for info level:
...more
Cecil Westerhof <[hidden email]>: Dec 17 03:18AM +0100

At the moment I have the following function:
proc getHourInDay {{currentTime -1}} {
if {${currentTime} == -1} {
set currentTime [clock seconds]
} ...more
Rich <[hidden email]>: Dec 17 05:55AM

> }
> ...
 
> Do I have to do it like the first code, or is there a better way?
 
I don't know if it is _better_, but there is _a way_ to create
something that works like you appear to expect ...more
Cecil Westerhof <[hidden email]>: Dec 17 07:53AM +0100

> input string were externally user controllable. I.e, think about what
> would happen if a user could get a string of the form "[exec format
> c:]" (or something similarly dangerous) to be passed ...more
Donald Arseneau <[hidden email]>: Dec 17 02:53AM -0800


> But this gives:
> too many fields in argument specifier "currentTime [clock seconds]"
 
> Do I have to do it like the first code, or is there a better way?
 
proc getHourInDay ...more
Donald Arseneau <[hidden email]>: Dec 17 02:56AM -0800

>> too many fields in argument specifier "currentTime [clock seconds]"
 
>> Do I have to do it like the first code, or is there a better way?
 
> proc getHourInDay {{currentTime now}} {
...more
Bezoar <[hidden email]>: Dec 17 07:51AM -0800

On Saturday, December 16, 2017 at 8:28:06 PM UTC-6, Cecil Westerhof wrote:
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
 
this works for me ...more
Bezoar <[hidden email]>: Dec 17 07:37AM -0800


> How can I send the password in the first case and do nothing in the second?
 
> Regards
> rambius
 
Problem that you are having is that you do run the send command as a consequence of first ...more
Bezoar <[hidden email]>: Dec 17 07:39AM -0800

On Sunday, December 17, 2017 at 9:37:30 AM UTC-6, Bezoar wrote:
> puts $output
> puts "SUCCESS!"
> exit 0
 
first line should read : Problem that you are having is that you do NOT run the...
...more
Andreas Leitgeb <[hidden email]>: Dec 17 03:47PM

> reports so and does not prompt for password. How can I differentiate
> between these two cases? The exit codes of ssh-copy-id are the same for
> both of them. The output when the key is being ...more
Cecil Westerhof <[hidden email]>: Dec 17 12:39AM +0100

Is it possible to have read only variables?
 
I could not find something one way or the other.
 
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
...more
[hidden email]: Dec 16 04:27PM -0800

On Sunday, December 17, 2017 at 12:59:06 AM UTC+1, Cecil Westerhof wrote:
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
 
A simple way is to ...more
Cecil Westerhof <[hidden email]>: Dec 17 03:33AM +0100


> A simple way is to use [trace] as is explained in the second answer to
> this question:
> https://stackoverflow.com/questions/46738112/use-of-trace-add-variable-read-in-tcl/46742603#46742603
...more
Robert Heller <[hidden email]>: Dec 16 09:34PM -0600


> Is there otherwise a protocol to signify that a variable should not be
> changed? In Bash you should really write it like:
> declare -r _foo="Some value"
 
There isn't a built in feature. ...more
Cecil Westerhof <[hidden email]>: Dec 17 05:23AM +0100

> upvar $varname var
> set var $value
> if {[lsearch -exact -- $args -r] >= 0} {
 
The -- gives:
bad option "--": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, ...more
Cecil Westerhof <[hidden email]>: Dec 17 05:48AM +0100

> while evaluating {declare _foo "Some value" -r}
 
> So I removed it.
 
>> trace add variable $varname {write} [list _readOnlyError $value]
 
And $varname needs to be $var.
...more
Cecil Westerhof <[hidden email]>: Dec 17 06:58AM +0100


> declare _foo "Some value" -r
 
> will do the same as the bash command
 
> declare -r _foo="Some value"
 
In combination with:
http://wiki.tcl.tk/398
 
I came at the following function: ...more
Rich <[hidden email]>: Dec 17 06:53AM

> So I am on the right way, but why does unset not trigger an error?
 
Because of this:
trace add variable name ops commandPrefix
^^^^^^^^^^^^^
and this: ...more
Gerald Lester <[hidden email]>: Dec 17 12:54AM -0600

On 12/16/2017 05:39 PM, Cecil Westerhof wrote:
> Is it possible to have read only variables?
 
> I could not find something one way or the other.
 
You may hack somethings -- as others have pointed ...more
Cecil Westerhof <[hidden email]>: Dec 17 09:07AM +0100

> and this:
> Any errors in unset traces are ignored.
 
> part of the trace documentation.
 
So it is impossible to generate an error? Also when using an
commandPrefix?
 
 
> % unset x ...more
Cecil Westerhof <[hidden email]>: Dec 17 10:21AM +0100

> set var ${value}
> trace add variable var {unset write} [list cmdprefix]
> }
 
Still another change:
proc readonly {varname value} {
proc cmdprefix {args} { ...more
Rich <[hidden email]>: Dec 17 02:22PM


>> part of the trace documentation.
 
> So it is impossible to generate an error? Also when using an
> commandPrefix?
 
The answer here appears to be "yes".
...more
Mike Griffiths <[hidden email]>: Dec 16 12:42PM -0800

> Thank you so much I am very grateful for your explanation, in summary those two options are equivelant to CSS "Z-index" property. my last question is: when you change the parent of a widget with ...more
Rich <[hidden email]>: Dec 17 05:39AM

> those two options are equivelant to CSS "Z-index" property. my last
> question is: when you change the parent of a widget with another
> parent it doesn't appears until you rise it?
...more
Cecil Westerhof <[hidden email]>: Dec 16 10:48PM +0100

I have it defined as:
proc ::tclreadline::prompt1 {} {
return [format "%s \[%s %s@%s:%s\]\n$ " \
tclsh${::tcl_version} \ ...more
Cecil Westerhof <[hidden email]>: Dec 16 11:11PM +0100


> I would prefer:
> ~/Documents
 
> Is this possible, or should I use a substitution on the output of pwd?
 
I rewrote it as:
proc ::tclreadline::prompt1 {} {
set user ...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].