Signals far from Slots

2014-05-04 Thread Jim Hewes via Digitalmars-d-learn
Is there a good way to connect signals and slots when the objects are far apart? All tutorials for signals and slots show the objects being readily accessible by the main() function. But what if they're not? Is there an elegant design? For example, here's a typical minimal demo: -

Re: Signals far from Slots

2014-05-05 Thread Ali Çehreli via Digitalmars-d-learn
On 05/04/2014 10:57 AM, Jim Hewes wrote: Is there a good way to connect signals and slots when the objects are far apart? All tutorials for signals and slots show the objects being readily accessible by the main() function. But what if they're not? Is there an elegant design? For example, here's

Re: Signals far from Slots

2014-05-08 Thread Jim Hewes via Digitalmars-d-learn
Thanks Ali, In the second part of that example I was hoping it was understood that Bar generates it's own signal. Sorry, I guess I wasn't clear; I was just trying to reduce code. I think maybe I'm really looking for a way that BarContainer doesn't have to know that Bar and Foo are connected.