I need to call some user init_proc before calling any Tcl or User Defined proc
From: gk (gopikn_at_rocketmail.com)
Date: 02/26/04
- Next message: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Previous message: Mark Roseman: "Re: Using Tcl to access things like RSS feeds, web logs, etc."
- Next in thread: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Reply: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Feb 2004 13:28:51 -0800
Folks,
I got stuck & Need your help !!
In Tcl, is there a way to call some init_proc before calling any of
the tcl or user defined procedures.
(eg)
init.tcl
*********
proc init_proc { } {
# Reset here all the global variable "
puts " name of the current running proc: "
puts " timestamp "
...
...
}
In xyz.tcl
-----------
proc xyz { } {
puts " xyz "
}
In main.tcl
------------
puts " Execting the procedures ..."
source init.tcl
source xyz.tcl
xyz
In the above example (main.tcl), is there a way that when i call xyz (
proc) , first the init_proc should call automatically and do some
operation then the actually xyz proc should execute. I dont want to
call init_proc in every single procedure or calling init_proc before
calling any procedure ( want this operation should handle by tcl
itself ).
Also whether Is it possible to bind a event in such a way that
whenever the proc is called the event is genereated and i can handle
the event and execute some init_proc and return.
Thanks in advance any help is appreciated..
-gk
- Next message: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Previous message: Mark Roseman: "Re: Using Tcl to access things like RSS feeds, web logs, etc."
- Next in thread: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Reply: Bryan Oakley: "Re: I need to call some user init_proc before calling any Tcl or User Defined proc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|