[chimera-dev] session callback

Eric Pettersen pett at cgl.ucsf.edu
Fri Jan 24 16:33:26 PST 2014

On Jan 24, 2014, at 2:22 PM, "Dougherty, Matthew T" <matthewd at bcm.edu> wrote:

> I was wanting to execute some code during quit session,

The two triggers for this are chimera.APPQUIT and chimera.CONFIRM_APPQUIT.  For the former, Chimera is going to quit afterward no matter what.  For the latter, the trigger data is a list.  You can append a text string to the list.  If you do, then that string will be displayed to the user in a confirmation dialog with the text "Really Quit?" appended afterward.  The user then chooses whether to really quit or not.  If they do quit then an APPQUIT will be coming along shortly...

> close session

chimera.CLOSE_SESSION and chimera.CONFIRM_CLOSE_SESSION.  Exactly analogous to the APPQUIT triggers.

> and save session;

SimpleSession.SAVE_SESSION.  The trigger data is an open file for you to write Python code to.  This covered in detail in the "Session Saving" programmer's example:

Programmer's Examples

> priority on quit.
> Is this going to be straight forward, such as registering a callback?

If you don't know how to register callbacks for triggers let me know.


                        Eric Pettersen
                        UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20140124/5dbc9a44/attachment.html>

More information about the Chimera-dev mailing list