[Tutor] [Edited] Plug-in enabled Program

Alan Gauld alan.gauld at btinternet.com
Mon Mar 2 11:59:40 CET 2009


"Daniele" <d.conca at gmail.com> wrote 

> have is how to adapt it to multiple plugins related to the same
> interface.

There are a few approaches. There is a design pattern (facade 
from memory) that allows this but you can also implement the 
plugin calls as a list of objects.

So instead of calling

theInteface.foo()

you load a list full of all the interface obujects and run

for if in the InterfaceList:
    if.foo()

That will apply each plugin in the sequence loaded.
That can of course result in one plugin wiping out the changes 
by another... but I don;t know of any way to avoid that.


HTH,

Alan G.



More information about the Tutor mailing list