Ticket #45 (closed task: wontfix)

Opened 1 year ago

Last modified 4 months ago

improve signal template

Reported by: clayasaurus Assigned to: ChristianK
Priority: major Milestone: 0.3
Component: unspecified Version: svn
Keywords: Cc:

Description (Last modified by ChristianK)

We currently use tango.core.Signal for our signals. It does not offer automatic wrapping of functions with compatible signature. Nor does it automatically disconnect slots if the owning object gets destroyed.

While fixing (is it even desirable?) the second is probably hard, we can definitely do something about the first issue.

Change History

05/15/07 16:03:47 changed by ChristianK

Note that due to this DMD bug http://d.puremagic.com/issues/show_bug.cgi?id=540 the flexible connect/disconnect methods don't work as well as they should. At the moment you have to call them with

mysignal.fconnect!(typeof(somedelegate))(somedelegate);

which is kind of annoying. I'm considering to switch back to Bill Baxter's class-based signals again just to work around this bug.

07/16/07 19:46:49 changed by clayasaurus

09/05/07 14:45:00 changed by clayasaurus

I see that flexsignal.d is commented out... are we not using flexsignal template any more?

I think I'm just going to stick with Tango's signal/slot mechanism for the GUI stuff as well.

~ Clay

09/05/07 16:28:34 changed by ChristianK

flexsignal is based on phobos.signal which in turn uses Object.notifyRegister/Unregister to be notified on object destruction. The tango Object does not support these calls, so we (unfortunately) can't use flexsignal in its current shape.

Tango signals don't get automatically disconnected on object destruction, see the tango docs!

10/01/07 11:37:13 changed by ChristianK

  • component changed from gui to unspecified.
  • description changed.
  • summary changed from Switch GUI phobos signals to our signal template to improve signal template.

03/07/08 13:01:23 changed by clayasaurus

  • status changed from new to closed.
  • resolution set to wontfix.

I'm just going to close this. I do not really understand the issue, and it seems minor...

03/07/08 13:14:57 changed by ChristianK

I *think* the original idea was to get the weak reference behaviour back. Now that Tango got monitor support, that might even be possible. Things will work without that, but signals won't be disconnected automatically.