sslot version 0.2
Lutger
lutger.blijdestijn at gmail.com
Fri Nov 17 09:06:45 PST 2006
I've uploaded a new version using the features of D since 0.173. Perhaps
it is useful to those who want return values and other callable types
than delegates from objects in their signals:
http://lutger.ifastnet.com
Some changes:
- No need for interface + mixin anymore to manage connections.
- No limit to the number of arguments.
- Slots can be temporarily blocked and unblocked.
- As suggested by Bill Baxter, a signal which doesn't have a return
value can connect any slot with a return value.
- Better compiler time error messages. I've included Don Clugston's
meta.nameof for this, I'm sure it has an open source license but I
couldn't find exactly which one.
- Classes can be injected with the signal code by using a mixin.
A test module is included.
Note that connecting is slightly different from phobos, you'll have to
provide the object reference:
signal.connect(&foo.bar, foo) instead of just signal.connect(&foo.bar)
[OT] I have to say it is a pleasure to program in D. The template
varargs is a godsend.
More information about the Digitalmars-d-announce
mailing list