Only one signal per object?

Spacen Jasset spacenjasset at yahoo.co.uk
Wed Oct 12 12:57:32 PDT 2011


On 11/10/2011 18:12, Justin Whear wrote:
>  From the docs:
> "Different signals can be added to a class by naming the mixins."
>
> So I think something like this ought to work:
> mixin Signal!(string) onBlah;
> mixin Signal!(int, int) onClicketyClick;
>
>
> Peter Ravinovich wrote:
>
>> Is there a way to have several signals per object?
>>
>> The example in std.signal seams to suggest that only one signal per object
>> can be emmited. Is it possible to have several events launched as it's
>> possible in .NET?
>>
>> For example, bind one object to onClick and another to onKeyUp.
>>
>> Thanks
>
I think this has come up before. It doesn't seem particularly intuitive. 
Perhaps it should be that the signals must be explicit to make things 
clear cut.


More information about the Digitalmars-d-learn mailing list