[Kde-imaging] Ownership policy

Jesper K. Pedersen blackie at kde.org
Fri Apr 9 13:22:45 CEST 2004


On Friday 09 April 2004 11:24, Aurélien Gâteau wrote:
| Le Vendredi 9 Avril 2004 10:50, Jesper K. Pedersen a écrit :
| > | Isn't it going to be tedious when multiple plugins get called? if we've
| > | got some non-modal plugins, they might keep a reference to a structure
| > | which could get changed - or even worse, deleted - behind their back.
| > | On the other hand having the host application do a fresh copy each time
| > | asked is not good either.
| >
| > Well the idea would be that if teh plugin wants to keep the data for a
| > longer time, then it should make a copy.
| > Remeber, howeverm that we are not talking multi processs or even multi
| > threading here, once the plugin is invoked, execution will continue there
| > till it returns, as it is the same execution thread as the main program.
|
| If we allow non-modal plugin dialogs (and I think we should), execution
| will come back to the main program while the plugin dialog is still
| visible.
sure, but that the belongs in the category of the plugin hugging onto the 
data. My point was that if the plugin asks for some data, then as long as 
execution was in that function no other plugins could get executed.

|
| > | Maybe we can specify that the ImageCollection objects must live for the
| > | whole life of the application and add some signals to KIPI::Interface
| > | so that the host can notify the plugins of changes in the collections.
| > | What do you think about this?
| >
| > I dont like the idea of having to explicit call a cleanup method, as that
| > just makes the job harder for the plugin developers.
|
| What cleanup method are you talking about?
I missread your comment above, sorry.

|
| > So lets choose on either of the two approaches I suggested. Personally I
| > dont care, and I doubt that any application would store their internal
| > data in the list of the plugins data structure, so the problem with
| > giving ownership to the plugin should be little. Of course this requires
| > the plugin to remember to do the clean up.
|
| This sounds good to me. I think having signals to notify plugins about
| changes in the collections would be a nice addition too.
Indeed, but lets try to do without for the very first version of plugins, to 
see where we actually needs the info. The point is that emitting the right 
signals might be difficult for the applications.

Cheers
Jesper.


More information about the Kde-imaging mailing list