Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I include my own created command in TCL/TK for windows version

Status
Not open for further replies.

csreedhar

Programmer
Jul 31, 2003
8
IN
How can I include my own created command in TCL/TK for windows version.
In Unix we can include in the Tcl script like below line..
#!/home/elixir/bin/tki

Where as tki is my own "C" program which created new tcl commands.

Could you please suggest me, how can I include like this in windows version tcl/tk.

 
Source the file where you have included the functionality of the command and then call the command using the namespace (if you have created it using a namespace.)

Say you have the command defined in abc.tcl in /x/y/z directory

then do a

source /x/y/z/abc.tcl

and you have the function abc::myProc defined in that than you can directly use [abc::myProc] in the current file. If you have not defined a namespace for the command myProc then it is a good idea to use a namespace as that takes care of structuring things correctly. Other wise try using it without the name space.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top