Re: Using globals in Tool.tcl

Bill Anderson (banderso@funb.com)
Tue, 26 Nov 1996 20:11:23 -0500

On Nov 26, 4:27pm, Juergen Schoenwaelder wrote:
> Subject: Re: Using globals in Tool.tcl
>
> blackert@leopard.cs.latrobe.edu.au (Tyson Blacker) said:
>
> Tyson> I haven't had very much exprience with programing in
> Tyson> tcl/tk nor tkined. But I am having trouble in creating a new
> Tyson> type of link. I will prirate of lot of Juergen's code.
>
> Tyson> The problem is that I cannot get Tool.tcl to read the global
> Tyson> arrays in my script. I used ip_discover.tcl as the base for
> Tyson> my script. I have tried to run my script before trying to
access
> Tyson> the arrays
>
> The Tool.tcl file defines how the Tkined mouse bindings work. It is
> internal to Tkined. The ip_discover.tcl script (like any script that
> extends Tkined) runs as a separate process that communicates with
> Tkined via a simple protocol. The protocol is hidden by the `ined'
> command. Of course, creating a global variable in one of these scripts
> has no effects on the internals of Tkined which is running as a
> separate process. I consider this a feature because it makes sure that
> scripts can't mess around with Tkined internals.
>
this sounds more like wanting to use 'LoadDefaults' found in
library.tcl. The LoadDefaults takes other parameters that tells it
which resource(s) you are interested in. For example, in your
~/.tkined/tkined.defaults, if you added a resource, let's
say 'application',

application.downColor: blue
application.upColor: green
:
:

then if i wanted that resource in addition to the others
in ip_discover.tcl I would do the following:

LoadDefaults icmp application

Now, you will be able to extract from 'default', application
resources you set in ~/.tkined/tkined.defaults.

That's my interpretation, sorry if i missed the boat.

-billa
> I am not sure if this answers your question.
> Juergen
> --
> Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw
> Computer Science Department, University of Twente, (Fax: +31-53-489-3247)
> P.O. Box 217, NL-7500 AE Enschede, The Netherlands. (Tel. +31-53-489-3678)
>-- End of excerpt from Juergen Schoenwaelder

-- 
---------------------------|-------------------------------
Bill Anderson              | First Union / One First Union
704-383-7191 (voice)       | 301 S. College Street, TW7/NC0116
email: banderso@funb.com   | Charlotte, NC
-----------------------------------------------------------
http://cmwww2.capmark.funb.com/~banderso/
---------------------------|-------------------------------