I am still using the tclIndex file to maintain my libarary. I keep my proc
files in one directory but not all of the use the "mylib_" naming scheme.
I've added the following to the bottom of my init procedure and so far I've
failed to see any problems. Yes, the vTcl(proc,ignore) variable grows each
time you call init within a vTcl session. But that has yet to cause me any
concern.
In any case, here it is:
global vTcl
set id [open [file join $mylib tclIndex] r]
foreach line [split [read $id] \n] {
if {[regexp {set auto_index\(([^)]*)} $line match proc]} {
append vTcl(proc,ignore) "|$proc"
}
}
Mitch.
>A-11: Rick Macdonald <[EMAIL PROTECTED]> has a solution: you should create a
>Tcl library with your functions (see a Tcl FAQ), then run the
>"auto_mkindex"
>command and then add your library directory to the auto_path:
>
> lappend auto_path /usr/local/lib/MyTcl
>
>where /usr/local/lib/MyTcl is the directory where your Tcl library is.
>
>The problem is that when you load the application into vTcl, it will
>save
>these functions into the application, and you don't want that. To avoid
>it,
>just add
>
> append vTcl(proc,ignore) "|mylib_*"
>
>This assumes that all the procs that you source in start with the string
>"mylib_". I'm not sure where to put this. Perhaps in your "init"
>function.
>It may be that vTcl runs the init function every time you switch to
>TEST
>mode, in which case the vTcl(proc,ignore) value would get longer and
>longer. But maybe this won't happen [ can somebody check this?] . Or,
>you
>could put it into the vTcl "globals.tcl" file. The vTcl default is to
>ignore procedures matching "tcl.*|tk.*|auto_.*|bgerror|\\..*":
>
> set vTcl(proc,ignore) "tcl.*|tk.*|auto_.*|bgerror|\\..*"
>
>The simplest solution will be to always call your functions starting
>with the
>string "tcl". Then you don't even have to modify the vTcl ignore list.
>
>
>--
>Joao Cardoso | e-mail: [EMAIL PROTECTED]
>INESC, R. Jose Falcao 110 | tel: + 351 2 2094322
>4050 Porto, Portugal | fax: + 351 2 2008487
>---------------------------------------------------------------------------
>To unsubscribe from the Visual Tcl mailing list, please send a message
>to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
>message body (where [EMAIL PROTECTED] is your e-mail address).
---------
Mitch Roe
Sverdrup Inc.
NASA Ames Research Center
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).