From: Luis Gracia (lug2002_at_med.cornell.edu)
Date: Wed Mar 28 2007 - 13:14:40 CDT

Hi Jim,

you are missing the pkgIndex.tcl file (put it in the same dir as your
exmp.tcl file) with the following line:

package ifneeded exmp 0.1 [list source [file join $dir exmp.tcl]]

This file will be use by the package system to find which file to load
when exmp is requested (by the vmd_install_extension proc).

Best,

Luis

James Keener said the following on 03/28/2007 10:45 AM:
> I'm trying to create a plugin (with tcl/tk) for vmd, and after a google
> search, found
> http://www.ks.uiuc.edu/Research/vmd/plugins/doxygen/tcltkplugins.html
>
> I used that and another pre-existing extension to create this file
> (exmp.tcl):
>
> package provide exmp 0.1
>
> namespace eval ::Exmp:: {
> namespace export exmp
> variable w
> }
>
> proc ::Exmp::exmp {} {
> variable w
>
> # create main window frame
> set w .exmp
> catch {destroy $w}
> toplevel $w
> wm title $w "Example"
> wm resizable $w 0 0
> }
>
> proc exmp_tk {} {
> ::Exmp::exmp
> return $::Exmp::w
> }
>
> in ~/lib/vmd/plugins/noarch/tcl/exmp0.1/. When I open vmd and type
> "vmd_install_extension exmp exmp_tk "Example", it adds the "Example"
> menu item but also says "The exmp package could not be loaded:" and no
> more but a new line. Would anyone be willing to give some advice or
> know of a tutorial that doesn't assume prior knowledge of how to get
> this all to work? Any help is appreciated.
>
> Thanks,
> Jim
>