From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Mar 28 2007 - 11:13:06 CDT

Hi,
  Did you remember to run "pkg_mkIndex ." in the directory containing
exmp.tcl to create the necessary pkgIndex.tcl file? Before you try
adding it to the VMD menu with vmd_install_extension you'll want to
make sure that it correctly autoloads when you run the command:
  package require exmp

Once that works, I would expect your script to work from the GUI as well
assuming there are no other problems. (The code below looked fine in
my very quick examination..)

  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Mar 28, 2007 at 10:45:18AM -0400, James Keener wrote:
> 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

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078