On Thursday 20 March 2008 19:52:08 Aaron J. Seigo wrote:

> i've add this clarification to the apidox for

> DataEngine::connectAllSources.

Nice! Thank you.

> i'm not sure we want or need this method to connect all sources that ever

> get created, though. connectAllSources is really just a convenience method

> to avoid having to loop over all sources and calling connectSource on each.

I agree. But still this should be clarified in docs, so people like me would understand that right away :)

> > NotifierApplet::sourceAdded: source "notification 1" added

> > NotifierApplet::dataUpdated: source "notification 1" changed

> > NotifierApplet::sourceRemoved: source "notification 1" removed

> > NotificationsEngine::notify: data was set

> > NotifierApplet::dataUpdated: source "notification 1" changed

>

> impossible to say without seeing all of your code. there are 3 ways that

> sourceRemoved can be triggered:

>

> * the number of sources limit was exceeded (if you aren't calling

> setSourceLimit in your code, that isn't it)

not the case

> * removeSource or clearSources is being called in your engine

no way :)

> * the applet is disconnecting from the source at some point and the source

> was created on demand (in sourceRequested) dropping the usage count to 0.

no, the only place i do something with the source in the engine is the 'setData' call which I shown in the previous mail.

The code is very simple - in applet there are three slots reacting on dataUpdated, sourceAdded, sourceRemoved. They just print kdebug, and the sourceAdded connects source.

Engine is created in applet's init() method by calling dataEngine("name");

Engine does setData in one of its methods which i trigger from outside using dbus call.

That's the scheme.

Really simple.

I can commit it to playground (aseigo: that's notifications-related work i started) - I am just not sure if applets/engines at such an early state of development are allowed to be in playground/base/plasma :)

Cheers,

Dmitry.