Errors - Re: Signals and Slots
Dave
Dave_member at pathlink.com
Mon Nov 6 09:04:23 PST 2006
Jarrett Billingsley wrote:
> "Walter Bright" <newshound at digitalmars.com> wrote in message
> news:eidh0g$10e1$1 at digitaldaemon.com...
>
>>> public import std.stdio;
>>> public import std.c.stdlib;
>>> public import std.outofmemory;
>
> That then works when the class has one signal, but trying to put more than
> one:
>
> class Input
> {
> mixin Signal!(int, int) click;
> mixin Signal!(char) keyDown;
> }
>
Good catch - this also happens w/o the 'public import' mod. in std/signals (if you import those into
your module) as well.
This is probably a show-stopper, because I don't think this would compete with the current QT
signal/slot mechanism, for example, if we have to wrap each Signal with a separate class.
Walter - is there a work-around for this problem, or a 'fix' of some sort planned?
I mean this is very, very cool... QT only recently bowed to market demand for a port to Java (their
website used to complain of Java performance issues), and the MOC hack has always been a problem for
C++ (IMHO). D is a natural for QT if this can be fixed. I think if it can be fixed, you should
approach them with it. It would be huge for D (and potentially for QT as well).
Thanks for these awesome new features!
> Gives..
>
> C:\dmd\bin\..\src\phobos\std\signals.d(181): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
> C:\dmd\bin\..\src\phobos\std\signals.d(196): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
> C:\dmd\bin\..\src\phobos\std\signals.d(232): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
> C:\dmd\bin\..\src\phobos\std\signals.d(181): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
> C:\dmd\bin\..\src\phobos\std\signals.d(196): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
> C:\dmd\bin\..\src\phobos\std\signals.d(232): Error:
> dtest.Input.Signal!(int,int).unhook at dtest.d(206) conflicts with
> dtest.Input.Signal!(char).unhook at dtest.d(206)
>> Execution finished.
>
> :S
>
> Mixins, mixins, mixins.
>
>
More information about the Digitalmars-d
mailing list