Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Sorry to jump on this question so late, but nothing, I mean <em>nothing</em> can beat looking at the source of an application that does something similar. (I might recommend something like <a href="http://pida.co.uk" rel="nofollow noreferrer">http://pida.co.uk</a>, but there are plenty of extensible wx+Python IDEs out there as that sounds like what you are making).</p> <p>If I might make a few notes:</p> <ol> <li><p>message passing is not inherently bad, and it doesn't necessarily cause coupling between components as long as components adhere to interfaces.</p></li> <li><p>shared state is not inherently bad, but I would go with your gut instinct and use as little as possible. Since the universe itself is stateful, you can't really avoid this entirely. I tend to use a shared "Boss" object which is usually a non-singleton single instance per application, and is responsible for brokering other components.</p></li> <li><p>For keybindings, I tend to use some kind of "Action" system. Actions are high level things which a user can do, for example: "Save the current buffer", and they can be conveniently represented in the UI by toolbar buttons or menu items. So your scripts/plugins create actions, and register them with something central (eg some kind of registry object - see 1 and 2). And their involvement ends there. On top of this you have some kind of key-binding service that maps keys to actions (which it lists from the registry, per session or otherwise). This way you have achieved separation of the plugin and keybinding code, separation of the editor and the action code. As an added bonus your task of "Configuring shortcuts" or "User defined key maps" is made particularly easier.</p></li> </ol> <p>I could go on, but most of what I have to say is in the PIDA codebase, so back to my original point...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload