f



Tcl Newbie: Call tk_* functions from Tcl application

Hi,

First, I am completely new to Tcl/Tk.

I am learning Tcl in order to customize another application (Laker) on
Solaris 2.8. Tcl is embedded in this application, which has many
extensions to access the application database, but no support for Tk.
Instead, it provides its own set of Tcl GUI functions.

I would really like more flexibility than what the app provides, plus
I would like to use some of the pre-built Tk dialogs for selecting
files, for instance. I don't see why I should re-invent the wheel.

I have downloaded and installed ActiveTcl and have been able to run
the Tk functions I need from within Wish.

So, my question is this: Is there some way to compile the ActiveTcl
functions and call them from Laker's Tcl interface?

Eg. 1) tk_chooseDirectory is compiled into a Tcl app called say 
       'getdir'.
    2) Laker's interface calls app 'getdir' with exec and gets 
       directory returned.

I hope this makes sense!

Thanks for any help you can offer.

Andrew Wilford
0
awilford (12)
7/31/2003 10:34:53 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

3 Replies
642 Views

Similar Articles

[PageSpeed] 33

Hi,

Thanks for your response. The version is 8.3.2 and the response from
'package require Tk' is 'can't find package Tk'. The app's R&D tech says
they don't support Tk yet. I thought it was a part of Tcl, but I guess not.

Can you elaborate when you say I can use wish? Will that allow me to return
a string to a calling Tcl script from within the Laker application?

Regards,
Andrew Wilford


0
awilford (12)
8/1/2003 5:28:52 PM
According to Andrew Wilford <awilford@adelphia.net>:
:Hi,
:
:Thanks for your response. The version is 8.3.2 and the response from
:'package require Tk' is 'can't find package Tk'. The app's R&D tech says
:they don't support Tk yet. I thought it was a part of Tcl, but I guess not.

Tk is an add on which can generally be dynamically loaded.  Download and
build Tk, as a shared extension, then in your script lappend the directory
where you installed tk to auto_path :

	lappend auto_path /insert/your/path/here
        package require Tk

and see if that helps.

-- 
Tenth Tcl/Tk Conference is this week! <http://www.tcl.tk/community/tcl2003>
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvirden@yahoo.com > <URL: http://www.purl.org/NET/lvirden/ >
0
lvirden272 (610)
8/2/2003 11:14:27 AM
Thanks!

I'll give it a try.

Andrew Wilford


0
awilford (12)
8/4/2003 3:23:58 PM
Reply:

Similar Artilces:

tcl application with tcl application
Here is another question, I have one tcl-based application A, my co- worker has a tcl-based application B. Now I want to integrate my application A into the application B. After integration, I want to be able to run A's tcl command in B. Assume I can only change A's code, is there any way to do this? On 17 Dez., 07:03, teacupfull business <teacupfull.busin...@gmail.com> wrote: > Here is another question, I have one tcl-based application A, my co- > worker has a tcl-based application B. Now I want to integrate my > application A into the application B. >...

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For ...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform:...

running other tcl from a tcl
Is that possible? 1 - sequentially to call two tcl files, like: c:\> tclkit-8.4.7.exe first.tcl second.tcl 2 - from a tcl to call other one # first.tcl content below exec hello.tcl # end regards, mauro ps.: I'm not experience in Tcl. Mauro Silva wrote: > Is that possible? > > 1 - sequentially to call two tcl files, like: > > c:\> tclkit-8.4.7.exe first.tcl second.tcl > > 2 - from a tcl to call other one > > # first.tcl content below > > exec hello.tcl > > # end > > regards, > m...

dynamic call of tcl proc from tcl
Hello, I would like to invoce a tcl proc from a line of tcl where I have a proc name and a list variable of arguments. eg. % callproc $procName $argList where: ..callproc - TCL Procedure for dynamically calling procedures ..procName - Name of procedure to be called in a string ..argList - List of Arguments My goal is to avoid creating a procedure call as a string and evaluating it as there are many potential pitfalls with using evals in such a way. Thanks, JsD Java script Dude wrote: > I would like to invoce a tcl proc from a line of tcl where I have a > proc name and a list varia...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an ...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persis...

Newbie to Tcl/Tk: Question about Tcl and VxWorks....
Hello All, I have tried looking on the offical tcl/tk website and also at WindRiver's without success. Please forgive my ignorance on this, but is tcl/tk available for VxWorks or is there in progress a port going on. Many thanks in advance, Richard "Richard Latter" <richard_l@latter.demon.co.uk> writes: > I have tried looking on the offical tcl/tk website and also at WindRiver's > without success. Please forgive my ignorance on this, but is tcl/tk > available for VxWorks or is there in progress a port going on. I have ancient Tcl 7.3 here, but don'...

Bash calls TCL, TCL calls Bash, 2nd Bash never reads input
I'm sorry but it's the ONLY way I can write this. I don't know how to read standard in in TCL; I don't know how to do complex string manipulation in Bash. So I have to write in the languages based on what I know. The bash script cmds.sh will read in various files. Check it out: # # Check to see if the user has entered a valid option if any # if ! [ $1 ]; then echo echo 'You must enter an option: ' echo '------------------------- ' echo " $0 -t = Transfer files " echo " $0 -a [--transferfiles] [--delete] [-d directory] [-f file(s)|*.*] ...

tcl-snmptools: SNMP v1/v2/v3 operations for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-snmptools Tcl-snmptools is a Tcl interface to the Net-SNMP library which provides operations for the management of remote SNMP agents. It supports all the standard SNMP v1/v2/v3 operations: connect, close, get, set, getnext, walk, bulkget, bulkwalk, trap, translate and others. It is currently in a functional state, but more work and testing needs to be done. Home page: http://sourceforge.net/projects/tcl-snmptols/ Man page: http://tcl-snmptols.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not fou...

How Tcl speaks for itself and how Tcl is not spoken for...
Hello It's Friday and... well... Two things about Tcl going through my mind this week, a nice anecdote and a eyebrow-rising thing on Wikipedia: Anecdote: Until three months ago I worked in a scientific institue where I wrote much software in Tcl, especially a big Build and Report System, some tools for automatic checking of coding style and other things. Tcl had a bad reputation there (not because of me... they dropped Tcl before I started there in favour of Joy, then JavaScript and now Python) and besides me, there was only one co-worker who appearantly writes some small Tcl-Scripts to...

How to pass function pointers (or sets of tcl statements) into a tcl proc?
Hi, What is the best way to pass a bunch of function pointers into a tcl proc? I want the proc to decide which one of the functions to run based on some logic. The passed in function pointers could be from a different namespace, but I want the proc to execute it. Any help is much appreciated. angryalgorist@gmail.com wrote: > > Hi, > > What is the best way to pass a bunch of function pointers into a tcl > proc? I want the proc to decide which one of the functions to run > based on some logic. > > The passed in function pointers could be from...

How to compile tcl or encrypt tcl
I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. But I cannot use the same method in Linux. Why? Is there any utility for me to compile or encrypt the code by using tixwish? The following is the simple code if I use the tixwish: #!/home/albertl/local/bin/tixwish puts "haha" And after using procomp by the TclPro1.5 Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version while executing "error "The TclPro ByteCode Loader is not available or does not support the correct version""...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

tcl hangs on exit for multiple open calls from within same tcl script
Hi, I am looking to run a couple of processes in parallel. But a strange hang = occurs randomly. I am invoking two tcl commands using open in parallel. Now= after a while one of the process would just hang indefinitely which I am n= ot able to understand why. The issue is easily reproducible on win 2008 ser= ver and other multi core machines. Am I doing something wrongly? What is th= e best way to do this? To reproduce, you just have to create the files and run loop.bat. You shoul= d see the hang within 15-20 minutes. Following are the files I am using=20 ******** loop.bat...

TCL/PHP problem involving a PHP function that has to utilize a TCL proc
I wrote this PHP function in the hopes that it would properly use a TCL proc I wrote about 4 years ago: if (!function_exists('proper_case')) { /** * Ths function will convert a string into a proper case format using the customized TCL proc "PROPER_CASE" from the included TCL string tools libraries * * @access public * @param mixed $text * @param mixed $tclLibPath Path to TCL Library files * @param DBActionPerformer $dbAP You must generate a descendant of MethodGeneratorForActionPerformer to retrieve customized command-line formatting to call TCL shell *...

Tcl
Hello, where can I see for tcl syntacs and how-to run a tcl test? Thank You Vittore ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu ...

Tcl
Hello all. I found on hobbes the afaik latest Tcl for Os/2 v8.35 Is there any newer port, cause i try to update the eggdrop and that says: Your Tcl version is much too old for Eggdrop to use. You should download and compile a more recent version. The most reliable current version is 8.5.X and can be downloaded from ftp://tcl.activestate.com/pub/tcl/tcl8_5/. -- With the best regards from the Netherlands, Tu, "Tellerbop" <Tellerbop@wint.nl>, hai scritto questo in data Wed, 14 Jan 2009 19:11:18 UTC: > Hello all. > > I found on hobbes the afaik latest Tcl for Os/2...

TCL
Hello, i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me how this can be done with VC 6.0? Best regards, Reinhold "Reinhold.kwauka" <bernd-reinhold.kwauka@t-online.de> wrote: >Hello, > >i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me >how this can be done >with VC 6.0? > >Best regards, >Reinhold > 1) get the source from http://tcl.sourceforge.net/ 2) open a command prompt 3) cd to the win/ subdirectory 4) call vcvars32.bat located in ??\vc98\bin\ of vc6 for wherever you installed it. 5) type @ the prompt: nmake -f makefile.vc -- David Gravereaux <davygrvy@pobox.com> [species: human; planet: earth,milkyway(western spiral arm),alpha sector] Reinhold.kwauka wrote: > Hello, > > i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me > how this can be done > with VC 6.0? > > Best regards, > Reinhold > > Its already done. Just download a binary release for windows and check \Program Files\Tcl\lib for the DLLs and static libraries. ...

2nd Call For Papers for the 17th Annual Tcl/Tk Conference (Tcl'2010)
[[ Important Changes: More information about registration at the hotel. Our location chair has organized special social activities, both geeky (FermiLab Tour) and cultured (Theatre). See below for more. ]] 17th Annual Tcl/Tk Conference (Tcl'2010) http://www.tcl.tk/community/tcl2010/ October 11 - 15, 2010 Hilton Suites/Conference Center Chicago/Oakbrook Terrace, Illinois, USA Important Dates: Abstracts and proposals due August 1, 2010 Notification to authors August 15, 2010 WIP and BOF reservations open August 1, 2010 Author materials due October 1,...

1st Call For Papers
22nd Annual Tcl/Tk Conference (Tcl'2015) http://www.tcl.tk/community/tcl2015/ October 19 - 23, 2015 Comfort Suites Manassas 7350 Williamson Blvd, 20109 Manassas, Virginia, USA Important Dates: Abstracts and proposals due August 24, 2015 Notification to authors August 31, 2015 WIP and BOF reservations open July 27, 2015 Author materials due September 28, 2015 Tutorials Start October 19, 2015 Conference starts October 21, 2015 Email Contact: tclconference@googlegroups.com Submission of Summaries Tcl/Tk 201...

MS Dictation and TCL
I'm trying to use the MS dictation tool while in TCL 8.5 program. The text starts to appear, but then the program crashes. It would be great to find a way to make this work. Thanks! Barney Tcl 8.5 (wish 8.5) makeindex (12/14/2007) MSWinXP sp3 plenty of ram and storage ...

Web resources about - Tcl Newbie: Call tk_* functions from Tcl application - comp.lang.tcl

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

NZ doctor Alan Kenny flooded with 'trash' applications for $370k job
The New Zealand GP who couldn't find a doctor to take up a $NZ400,000 ($370,000) position at his practice has been inundated with "trash" applicants ...

NZ doctor Alan Kenny flooded with 'trash' applications for $370k job
The New Zealand GP who couldn't find a doctor to take up a $NZ400,000 ($370,000) position at his practice has been inundated with &quot;trash&quot; ...

Patent application shows how Apple Watch could measure ambient sound to adjust volume of iPhone alerts ...
iPhones could in future automatically sound louder or quieter notification alerts depending on the level of background noise. A patent application ...

NASA just smashed its record for astronaut applications—18,000+
... excitement about the future of NASA, with the space shuttle soon to debut, was palpable. So when the space agency called for astronaut applications, ...

Oklahoma: Concealed Carry Permit Applications Surge Following Obama’s Gun Control
... State Bureau of Investigation numbers suggest gun control talk and Pres. Obama's gun controls contributed to surging concealed carry applications. ...

MBA: Mortgage Applications Increased in Latest Weekly Survey, Purchase Applications up 30% YoY
From the MBA: Refinance Applications Drive Increase in Latest MBA Weekly Survey Mortgage applications increased 8.2 percent from one week earlier, ...

Refinances pushes mortgage applications 8.2% higher
The lower interest rates plunge boosted refinance volume to its highest level in over a year.

European Central Bank Exploring Blockchain Tech Applications
In a new report, the European Central Bank (ECB) has said it is investigating blockchain use within its securities and payments settlement systems. ...

Announcing Blockstack: Decentralized DNS and Identity for Blockchain Applications
The blockchain holds great promise for developing decentralized protocols and applications such as marketplaces (e.g., openbazaar ), registries ...

Resources last updated: 2/28/2016 2:44:17 PM