For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2007 > Re: Tcl Package question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Tcl Package question
slebetman@yahoo.com

2007-04-21, 8:06 am

On Apr 21, 5:33 am, quynhvan...@gmail.com wrote:
> Is there a way to list all procedure/function APIs that are available
> in a giving package that users can use. No, the internal api won't get
> listed. Thanks.


The only way I can think of is to compare [info commands] before and
after loading the package:

set before [info commands]
package require Tk
set tkcommands [info commands]

foreach x $before {
if {[set i [lsearch -exact $tkcommands $x]] != -1} {
set tkcommands [lreplace $tkcommands $i $i]
}
}
puts $tkcommands

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com