signal slots library
Bastiaan Veelo
Bastiaan at Veelo.net
Thu Oct 12 13:35:14 PDT 2006
Hi Lutger,
I once had a project like that, it was a fun exercise.
http://svn.dsource.org/projects/dcouple/trunk/managed/doc/index.html
http://www.dsource.org/forums/viewforum.php?f=32
http://svn.dsource.org/projects/dcouple/downloads/
I wish that some of the new language features were available back then.
My aim was mainly to arrive at an easy and readable API or syntax,
because that was a concern in some of the threads in the newsgroup back
then. Another objective was the management of connections, so they are
cleaned up when senders or receivers are deleted.
I quickly browsed your documentation, but could not find the answer to
an important question:
What happens to an object when only connections exist and it is not
otherwise referenced anymore? Does it get collected by the garbage
collector, and does it disconnect cleanly when it does?
The answer for my implementation is no, unfortunately, but Uwe Salomon
got it right.
http://www.uwesalomon.de/code/indigo/files/core/cmdtarget-d.html
I also think that there should be a Signals and Slots implementation in
the "standard" library, but it should be one that is invisible to the
garbage collector, and works well with it!
Best regards,
Bastiaan Veelo.
More information about the Digitalmars-d-announce
mailing list