On Tue, 25 Jul 2000, Yogindra Persaud wrote:
> Last email: How do I go about listing off things in a tcl call stack.
>
> What I meant was the following:
>
> I'm building a history tree for an application written in java, that has
> an embedded tcl interpreter. Now when the user types something into the
> command box, how do I see what the interpreter does behind the scenes.
> For example, let's say I had a simple tcl script called "open.tcl", and
> all that it had in it was:
>
> proc foo {} { puts "opening file" }
>
> The user will first of all type "source open.tcl" to create the command
> "foo". Then the user types "foo" and the string 'opening file' is printed
> to the screen.
>
> My history would look something like the following:
>
> source open.tcl
> |
> -> proc foo
>
> foo
> |
> -> opening file
>
>
> -Any help would be appreciated.
Well, there is a history command in Tcl, you can use that to find the
toplevel commands that the user typed in, but that will not record
what sub commands were called. You might want to look at TclX, it
has a set of "profile" commands that record each call made
and report them to you in an array. That might be your best
bet, but it will only work with Tcl Blend.
http://www.neosoft.com/tclx/
I hope that helps
Mo DeJong
Red Hat Inc
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com