f



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?
0
12/17/2009 6:03:36 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

4 Replies
1925 Views

Similar Articles

[PageSpeed] 10

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.
>
> 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?

Hi,
if A and B are both Tcl scripts, then I'd refactor my application A to
be a library package with a namespace "::A" instead and also with an
exported main procedure like:

  ::A::run $args

Then, all that B is left to do, is to "require" package A and use it's
funtionality.

Cheers...
Shin
0
Shin
12/17/2009 11:04:03 AM
At 2009-12-17 01:03AM, "teacupfull business" 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.
>  
>  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?

If you can't change B, how do you expect B to invoke A?

-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous
0
Glenn
12/21/2009 2:45:38 PM
On 21 Dez., 15:45, Glenn Jackman <gle...@ncf.ca> wrote:
> At 2009-12-17 01:03AM, "teacupfull business" wrote:
>
> > =A0Here is another question, I have one tcl-based application A, my co-
> > =A0worker has a tcl-based application B. Now I want to integrate my
> > =A0application A into the application B.
>
> > =A0After integration, I want to be able to run A's tcl command in B.
>
> > =A0Assume I can only change A's code, is there any way to do this?
>
> If you can't change B, how do you expect B to invoke A?
>
> --
> Glenn Jackman
> =A0 =A0 Write a wise saying and your name will live forever. -- Anonymous
You may try to
You cannot change a program without access to it ;)
You'd need at last access to B's user's .tclshrc file to hook in,
AFAIK.
0
Shin
12/21/2009 2:59:08 PM
On Dec 17, 1:03 am, teacupfull business
<teacupfull.busin...@gmail.com> wrote:

>
> After integration, I want to be able to run A's tcl command in B.

When you write an application, the way to run it, in another tcl
program, is to use exec or open "|..." to call the program.

If, instead of running program A, you want to run the same Tcl proc's
as A uses, but from B, then you have to rewrite A so all of its
functionality is available inside procs, then change B so that it uses
source or package require to get that code into B.

>
> Assume I can only change A's code, is there any way to do this?

If B happened to read a file of the user via source, then with some
work you can do it. If not, if B is a Tk program that you could "send"
commands to via the Tk send command, you might be able to go that
route.

If B is not written in a way to accept commands outside itself, then
you are pretty much going to be out of luck.
0
Larry
12/22/2009 11:50:06 AM
Reply:

Similar Artilces:

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 ...

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:...

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 ...

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...

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...

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 ...

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...

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 ...

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""...

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...

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 ...

Conversing with a tcl application...
Hi, I have written a small tcl app for my linux laptop that watches /proc/interrupts. If the interrupt count for the keyboard, touchpad, or mouse does not change within a specified ( currently hard coded) interval, the program will do some house cleaning and then "suspend" to memory. Subsequent keyboard or touchpad activity will awake the computer from the sleep state. (If there was an interrupt the "time to sleep" parameter is reset.) The program is started at boot time and runs in the background. It seems to work fine... I would like to be able to control the "ti...

Tcl application deployment
Now there are two main ways to deploy Tcl/Tk application 1. Provide user with bunch of script and dynamic library files (possibly using some installer or package manager to simplify installation) 2. Pack everything into one big fat executable using starkit, prowrap or freewrap. Both ways has some flaws. Flaws of first way are evident and I wouldn't stop on them. Flaws of second way are following: 1. Each application to be installed on user machine has to bring its own Tcl interpretator and any packages it uses. 2. As far as I know, no OS provides way to load dynamic libraries using...

Web resources about - tcl application with 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 ...

ACT development application volume falls between 2015 and 2014
Development applications dropped in the ACT in 2015 compared with 2014, year-end government figures show.

AVO application against Labor's Jamie Clements withdrawn
An application for an apprehended violence order against Labor powerbroker Jamie Clements - based on allegations he tried to kiss a female staffer ...

Patent application shows Apple Watch band that transforms into a case, stand and Mac accessory
An Apple patent application published today reveals an idea for an interesting variation on the magnetically-closed Milanese Loop band that allows ...

Seagate Introduces First 8 TB Hard Disk Drive for Consumer NAS Applications
Seagate Technology on Tuesday introduced its new breed of hard disk drives (HDDs) for network area storage (NAS) and RAID applications. The new ...

Tech City UK received just 37 applications for a visa scheme that could allow 200 tech immigrants to ...
Tech City UK, a taxpayer-funded government organisation, has received just 37 applications since April 2015 for a dedicated technology visa that ...

MBA: Mortgage Applications Increased in Latest Weekly Survey, Purchase Applications up 17% YoY
From the MBA: Refinance Mortgage Applications Increase as Rates Fall in Latest MBA Weekly Survey Mortgage applications increased 9.0 percent ...

Mortgage applications rebound
Mortgage applications increased 21.3 percent on a seasonally adjusted basis, for the week ending January 8th, versus previous week,

SURPRISE! Mizzou Sees Application Drop After Days Of Protests, Illusory Klan Hoods, Poop Swastika
SURPRISE! Mizzou Sees Application Drop After Days Of Protests, Illusory Klan Hoods, Poop Swastika

Himax shipping LCOS microdisplays and WLO products for AR applications
... mass shipments of its liquid crystal on silicon (LCOS) microdisplays and wafer-level optics (WLO) products for augmented reality (AR) applications. ...

Resources last updated: 1/24/2016 7:04:56 AM