[chimera-dev] Adding a button to my extension...

Daniel Greenblatt dan at cgl.ucsf.edu
Mon Nov 24 17:41:20 PST 2003


Hi Lars,

We are aware of the bug you have described (adding some directories to the
Tools menu causes Chimera to seg fault) and we are in the process of
determining the cause of this behavior (it only happens when you add some
directories).

In the meantime, I can suggest a workaround that will let you run your
extension using Chimera's extension interface (i.e. not IDLE !!), which
will allow you to access it through the menus, or from a toolbar button,
putting it into the Favorites menu, or autostarting it.

I'm assuming you're using the latest release, build 1872.
If you go to

  Favorites --> Preferences

from the menus, then choose the 'Preferences' category, this will tell you
where your preference file is saved. Most likely it will be somewhere like

   $HOME/.chimera/preferences

If you open up this file for editing (it's just a big dictionary),
and search for the term 'dirList', it will be a key in a dictionary
called 'Tools', and the
corresponding value is a list of directories which chimera will look in
for extensions. So let's say that your extension is located at:

    /home/lars/chimeraexts/PocketGraphBrowser

, you would add the string '/home/lars/chimeraexts' to that list, so it
would look like:

   'dirList': ['/home/lars/chimeraexts'],

Note that if you did have other directories configured for Chimera to
search, this list would have multiple elements:

   'dirList': ['/tmp/some/stuff', '/usr/local/other/dir', '/home/lars/chimeraexts'],


Please let us know if this solves your problem.

--Dan

----------------------------
Daniel Greenblatt
UCSF Computer Graphics Lab
dan at cgl.ucsf.edu

On Mon, 24 Nov 2003, Lars Kunert wrote:

> Date: Mon, 24 Nov 2003 12:10:56 +0100
> From: Lars Kunert <lkunert at mpi-sb.mpg.de>
> To: chimera-dev at cgl.ucsf.edu
> Subject: [chimera-dev] Adding a button to my extension...
>
> Hi!
>
> My application (extension) works fine when execute it within the built-in
> IDLE.
>
> The python-code basically executes an external program (using "popen" )
> and manages communication between the application and chimera through
> named pipes...
> (The external Application uses Qt and all my trials to smoothly integrate
> it by use of a python wrapper have failed...)
>
> Now I want to add an icon to chimera, which should call my extension in
> the same way I do it in the IDLE.
>
> I did not manage to get the ToolbarButtonPackage working:
>
>
> the related documentation seems to be completely outdated:
> ""The example code files and ToolbarButton.tiff must be saved in a
> directory named ToolbarButtonExtension. To run the example, start chimera,
> bring up the extension manager (via the Manager... entry in the Extensions
> menu), select the Directory tab, and Add the directory above the
> ToolbarButtonExtension directory. A MainChain entry should appear under
> the Utilities extension category.""
>
>
> Anyway, the ToolbarButtonExample works, but I can not adapt it to my
> application. When I add the path within the Favorites/Preferences/Tool -
> Tab chimera dies...
>
> I include the set of python files I use:
>
>
>
>
>
> Thanks for your help,
>
> Lars


More information about the Chimera-dev mailing list