Errors - Re: Signals and Slots

Bill Baxter dnewsgroup at billbaxter.com
Mon Nov 13 00:05:09 PST 2006


Walter Bright wrote:
> Bill Baxter wrote:
>> Is this a fix we can make ourselves ourselves by tinkering with 
>> std/signals.d?
> 
> http://www.digitalmars.com/d/phobos/signal.d


Here's a few more problems with std.signals:

*) Can't make a global signal.  With Lutger's versions using objects for 
signals this wasn't a problem.  But a mixin in the global scope causes a 
"can't have a dtor outside a class" error.

If you stick with mixins for implementing signals, I think there should 
probabaly be a simple SignalObj class that wraps a signal. Unfortunately 
   pretty much anything I've tried along these lines starting with

      class SignalObj(T...)
      {
      }

currently generates an ICE.


*) More mixin import scoping issues.
    This seems to be impossible:

    import ssig=std.signals;

    And that isn't fixed by making the std/signals.d imports public.

--bb



More information about the Digitalmars-d mailing list