[haiku-development] Re: R1/a4 initial planning
- From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 27 Feb 2012 11:55:43 -0800
On Mon, Feb 27, 2012 at 09:48:12AM +0100, fano il primo wrote: > On Sun, Feb 26, 2012 at 11:25 PM, Pete Goodeve > <pete.goodeve@xxxxxxxxxxxx>wrote: > > Just fTR, while trying to learn something about Qt myself (never used it), > > I came across the "sigslot library": http://sigslot.sourceforge.net/ > > It's not quite the same as the Qt concept, because there's > > no inter-thread invocation of slots -- they're always executed in the > > calling thread -- but it might be interesting to take a look at. > > > > As this shows, a moc isn't necessary for the concept itself, and I can't > > see any fundamental reason why behind-the-scenes queueing couldn't > > be added (though it would need more than a header). > > > I think Haiku API "MessageReceived()" method is more simple to > understood/use that the Slot/Signal method... moc or not, I'd say is more > clear that for a button pressed I receive a Message from it, that I do have > to "connect" to be notified... more "C" like approach maybe, instead the Qt > is more C++ like, maybe, as all is hidden to the user/developer: if you see > the "moc" code wed see a classic loop and a switch... in the end the same > thing of MessageReceived(), right? To clarify, I was *not* suggesting signals/slots as a replacement for BMessages. However, I thought if they could be implemented on top of our current scheme they might be a useful feature to have on occasion. The (possibly) nice property of signals/slots is that they are 'many-to-many', as opposed to the single sender/receiver in messages. I'm pretty satisfied with setting up messages with targets, but I can conceive of situations where adding and removing slots might be convenient. I haven't thought deeply about implementation at all, but I'd imagine sending a signal would create a specially configured BMessage for each (queueable) slot, containing a pointer to the slot method and the data, and the BLooper would know about such messages and dispatch them appropriately. (For experimental development one wouldn't need a modified BLooper -- just a customized MessageReceived.) The implementation would have to be able to handle a slot being deleted after being connected, but I think BMessengers would work for that. > > Maybe it could be better in some cases a callback mechanism? > Let suppose this new BButton constructor: > > btn = new BButton(BRect(10, 10, 60, 30), "Test", "TEST", > beApp->clicked)); > I don't see this giving any advantage over a message. It's still one-to-one, anyway. > > What do you think? > In the end the slot/signal is if you want to not use more MessageReceived, > correct? As I said, I see it as possibly complementary -- not a replacement. Cheers, -- Pete --
- References:
- [haiku-development] Re: R1/a4 initial planning
- From: Niels Sascha Reedijk
- [haiku-development] Re: R1/a4 initial planning
- From: Stephan Aßmus
- [haiku-development] Re: R1/a4 initial planning
- From: fano il primo
- [haiku-development] Re: R1/a4 initial planning
- From: Rene Gollent
- [haiku-development] Re: R1/a4 initial planning
- From: fano il primo
- [haiku-development] Re: R1/a4 initial planning
- From: Ingo Weinhold
- [haiku-development] Re: R1/a4 initial planning
- From: Gabriel Harrison
- [haiku-development] Re: R1/a4 initial planning
- From: Ryan Leavengood
- [haiku-development] Re: R1/a4 initial planning
- From: Pete Goodeve
- [haiku-development] Re: R1/a4 initial planning
- From: fano il primo
- [haiku-development] Re: R1/a4 initial planning
Other related posts:
- » [haiku-development] R1/a4 initial planning - Matt Madia
- » [haiku-development] Re: R1/a4 initial planning - SMC.Collins
- » [haiku-development] Re: R1/a4 initial planning - Alexander von Gluck
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Kunal Bharati
- » [haiku-development] Re: R1/a4 initial planning - Kunal Bharati
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Simon Taylor
- » [haiku-development] Re: R1/a4 initial planning - Urias McCullough
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Fredrik Holmqvist
- » [haiku-development] Re: R1/a4 initial planning - Adrien Destugues
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Adrien Destugues
- » [haiku-development] Re: R1/a4 initial planning - Ralf Schülke
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Alex Wilson
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - "Jürgen Wall"
- » [haiku-development] Re: R1/a4 initial planning - Justin Stressman
- » [haiku-development] Re: R1/a4 initial planning - lodewijk andré de la porte
- » [haiku-development] Re: R1/a4 initial planning - Ralf Schülke
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Justin Stressman
- » [haiku-development] Re: R1/a4 initial planning - Fredrik Modèen
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Adrien Destugues
- » [haiku-development] Re: R1/a4 initial planning - Donn Cave
- » [haiku-development] Re: R1/a4 initial planning - John Scipione
- » [haiku-development] Re: R1/a4 initial planning - Dariusz Knociński
- » [haiku-development] Re: R1/a4 initial planning - Alex Wilson
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Adrien Destugues
- » [haiku-development] Re: R1/a4 initial planning - Adrien Destugues
- » [haiku-development] Re: R1/a4 initial planning - Clemens
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Andrew Wood
- » [haiku-development] Re: R1/a4 initial planning - Sean Collins
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Dariusz Knociński
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Rimas Kudelis
- » [haiku-development] Re: R1/a4 initial planning - Niels Sascha Reedijk
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Cian Duffy
- » [haiku-development] Re: R1/a4 initial planning - fano il primo
- » [haiku-development] Re: R1/a4 initial planning - Rene Gollent
- » [haiku-development] Re: R1/a4 initial planning - Clemens
- » [haiku-development] Re: R1/a4 initial planning - Gabriel Harrison
- » [haiku-development] Re: R1/a4 initial planning - fano il primo
- » [haiku-development] Re: R1/a4 initial planning - Paul Davey
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Matt Madia
- » [haiku-development] Re: R1/a4 initial planning - Gabriel Harrison
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Fredrik Holmqvist
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Fredrik Holmqvist
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Blank Bruno
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Pete Goodeve
- » [haiku-development] Re: R1/a4 initial planning - fano il primo
- » [haiku-development] Re: R1/a4 initial planning - kirilla@xxxxxxxxxx
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - SMC.Collins
- » [haiku-development] Re: R1/a4 initial planning - Pete Goodeve
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - SMC.Collins
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - Rimas Kudelis
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - "Axel Dörfler"
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Rimas Kudelis
- » [haiku-development] Re: R1/a4 initial planning - Andrew Hudson
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - PHilip RUshik
- » [haiku-development] Re: R1/a4 initial planning - pulkomandy
- » [haiku-development] Re: R1/a4 initial planning - Pier Luigi
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Ralf Schülke
- » [haiku-development] Re: R1/a4 initial planning - pulkomandy
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Truls Becken
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Gabriel Harrison
- » [haiku-development] Re: R1/a4 initial planning - lodewijk andré de la porte
- » [haiku-development] Re: R1/a4 initial planning - Gabriel Harrison
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Ingo Weinhold
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - François Revol
- » [haiku-development] Re: R1/a4 initial planning - Axel Dörfler
- » [haiku-development] Re: R1/a4 initial planning - pulkomandy
- » [haiku-development] Re: R1/a4 initial planning - Gabriel Harrison
- » [haiku-development] Re: R1/a4 initial planning - Stephan Aßmus
- » [haiku-development] Re: R1/a4 initial planning - Julian Harnath
- » [haiku-development] Re: R1/a4 initial planning - Ryan Leavengood
- » [haiku-development] Re: R1/a4 initial planning - pulkomandy
- » [haiku-development] Re: R1/a4 initial planning - pulkomandy
- » [haiku-development] Re: R1/a4 initial planning - Clemens Zeidler