|
From: Jan K. <jan...@pa...> - 2002-06-19 14:36:59
|
Hello everybody, if you want to see how the plugins system is going to work, have a look at the cvs code. It contains a file plugin.tcl that contains the interface, well, at least the gui part of it ;-) I think it give a good idea of what I'm planning to make. Each plugin will have it's own directory, containing a configuration file with at least the following variables: name (name of the plugin, eg letssee in the cvs example) description (the description to be shown) source (main source file, the top of what has to be sourced) unload (either yes, no or partly) unloadproc (the proc that has to be run to unload a plugin (if possible, plugins that make severe changes to the interface can not be unloaded) configproc (optional proc to configure the plugin) ttdeps (tcl/tk deps, just for information to the user) eddideps (plugins that have to be loaded before the plugin can be loaded, or a specific eddi version, once again, just for information) That's all. Inside the eddi code, at certain places there will come code that validates every item in a list as if it was a tcl command, this way plugins will be able to execute code eg when another tab is raised, just by appending the name of the proc at the end of the list variable, when a proc is unloaded it should therefore redefine all this procs to be empty ones or remove them from the list. To avoid duplicated names, there should be a convention that every procedure belonging to a plugin should have a name like: pl_pluginname_procedurename This, just to avoid risks. Also, plugins will be able to destroy eddi. This is bad, but it's the only way we can continue to add new functionality to eddi and keep it reasonably fast: you don't need all new functions, you can select the ones you need. kind regards, Jan |