[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Signals/slots via DCOP
From:       Waldo Bastian <bastian () kde ! org>
Date:       2000-08-03 21:06:12
[Download RAW message or body]

On Mon, 31 Jul 2000, Matthias Ettrich wrote:
> > > Any reasons for that that I'm overlooking?
> >
> > No not really. Basically the reason is that the DCOPClient/Server don't
> > seem to know the concept of "sending object", I didn't want to introduce
> > it.
> >
> > I agree that App/Obj/Signal <-> App/Obj/Slot is more generic so it might
> > be a good idea to expand it to that.
> >
> > Implementation wise, I think the sending-object could simply be an extra
> > constraint that needs to be satisfied when delivering the signal.
>
> agree.
>
> > Automatically disconnecting the signal when the sending object destructs
> > needs some attention. The dcop-server doesn't know about the lifetime of
> > objects, so the objects themselves should make sure to disconnect any
> > signals. Actually, I don't think that connections are currently removed
> > when a receiving-object destructs, so I guess both these issues should be
> > addressed in one go.
>
> Agree. DCOPObject needs a bitflag "hasConnections" or better a connection
> counter In its destructor, it currently removes itself from the objectMap
> only. It has to cleanaup connections as well if there are any.
>
> Will you go for it? I'm a bit short of time currently and I rather want to
> empty kwin's buglist.

Ok, DCOPServer / DCOPClient have support for "sending object" now. Shall I 
put some wrappers for emit / connect /disconnect in DCOPObject?

I can also disconnect all connections from a certain object but at the moment 
objects themselves don't know if anyone has connected to them. So you would 
always need to do a DCOP call from the DCOPObject destructor. The other 
option is that the dcopserver informs the object when someone connects to it 
so that it can keep a count.

Cheers,
Waldo



-- 
Make way, KDE/Linux is coming to a desktop near you!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic