[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: setInstance() question
From: Simon Hausmann <hausmann () kde ! org>
Date: 2001-11-24 9:33:48
[Download RAW message or body]
On Mon, Nov 12, 2001 at 10:32:50AM -0700, Kurt Granroth wrote:
> TAnGorN (Anatoli Gorchetchnikov) wrote:
> > On loading KPart with plugin, if I have plugin factory and use
> > setInstance() call in plugin constructor it sets it to plugin factory
> > instance as I want it to. But after that the part gets initialized,
> > and call of setInstance() there not only sets it for the part, but
> > also resets it for plugin, so now plugin->instance() returns part's
> > instance.
> >
> > Is it a bug or a feature? If feature, than what's the reason behind
> > it?
>
> It was a bug fix, actually. I needed Plugins to do a lot more work
> in finding out their XML so that XML-GUI rebuilding would work better.
>
> Can you send me your code? Perhaps we can find a way for both the
> toolbar editor and your app to get along :-)
But forcing a KInstance object from outside on the plugin sounds
conceptually wrong to me. An instance belongs to the component,
because it provides a way for the component to find private resources
(icons, files, etc.) .
Isn't there a way to re-implement the virtual methods of
KXMLGUIClient inside KParts:Plugin to get the behaviour you're
looking for while still giving the plugin its own instance?
Simon
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic