Are any GUI libs going to make use of signals/slots?

Tomas Lindquist Olsen tomas at famolsen.dk
Sun Dec 10 04:57:43 PST 2006


Craig Black wrote:

> 
> "Lutger" <lutger.blijdestijn at gmail.com> wrote in message
> news:elft0s$1flt$1 at digitaldaemon.com...
> > Craig Black Wrote:
> > 
> > > 
> > > "Chris Miller" <chris at dprogramming.com> wrote in message
> > > news:op.tj42pfdcpo9bzi at tanu...
> > > > On Tue, 05 Dec 2006 18:54:19 -0500, Craig Black <cblack at ara.com>
> wrote:
> > > > 
> > > >> So you are satisfied with the functionality you have with your
> current
> > > >> design.  OK.  As far as the example that you cited, this seems
> > > to be
> a
> > > >> specific case.  In this case, would it not be a simple matter
> > > to >> maintain a
> > > >> reference to the object that you don't want to be deallocated?
> > > > > 
> > > > 
> > > > But I told the timer to by registering a callback.. shrug
> > > > 
> > > > I guess if majority of people prefer std.signals I'd switch; I
> > > > might
> put
> > > > up a poll on the DFL forum.
> > > 
> > > I'm not saying you should switch.  It's just worth considering,
> > > that's
> all.
> > > If you feel that your current design is better, then no problem.
> > > 
> > > However, slots and signals are widely used in C++ without language
> support.
> > > With language support this approach is all the more attractive
> > > It would
> be
> > > nice if all GUI libraries written in D used a standard
> > > communication mechanism.  Perhaps we could even work toward some
> > > sort of
> interoperability.
> > > 
> > > -Craig
> > > 
> > 
> > But isn't the beauty of signals in D that slots are plain delegates
> > that
> 'just work'. There is already interoperability in this way. Except for
> acting as a weak reference, signals are the same as arrays of
> delegates.
> > Or have I missed your point?
> 
> It's just frustrating to that there are so many GUI libs for D, but
> most are not very complete.  Walter tried to remedy this by
> standardizing on DWT, but it didn't seem to work.  If GUI libs were
> interoperable, that is, if a widget from one lib could plug into a
> widget from another, then all library maintainers could work together
> and share a common code base.
> 
> As it is, everybody is doing their own thing.  That's not to be
> critical of their work.  They're doing more good than I am.  But if
> everyone used a common approach, perhaps some common abstract
> classes, then each contributor could contribute to a common GUI
> library.
> 
> Anyway, since signals are part of phobos now, it only seems logical
> that this could be a common standard.
> 
> -Craig

While a noble idea, I dont think this is realistic. People want
different things from a GUI library and others just like implementing
them... I find it highly unlikely that you could make it work due to
very different designs...


More information about the Digitalmars-d-dwt mailing list