View previous topic :: View next topic |
Author |
Message |
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Mon Apr 12, 2004 1:00 pm Post subject: Delegates |
|
|
We have talked about replacing listeners in DWT with delegates, a more elegant solution in D. And I've seen their use in DSC a bit, but I'm wondering if there is a tutorial out there that could be posted here. _________________ I really like the vest! |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
|
brad Site Admin
Joined: 22 Feb 2004 Posts: 490 Location: Atlanta, GA USA
|
Posted: Tue Apr 13, 2004 7:11 am Post subject: |
|
|
Thanks. I'll take a look. _________________ I really like the vest! |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Tue Apr 13, 2004 9:31 pm Post subject: Delegate Info |
|
|
More delegate info:
Andy wrote: | I do have a relatively nice template class that mimics C# events. You
can get it at [old link] if you want to use
it. (or simply pick it for ideas) (from D:18422) |
Andy's listener.d is now part of Apropos.
Also, I added two delegate example to the tutorial section: Delegate 1 Delegate 2. Nothing fancy, they're just self-contained versions of code found in the D spec.
By the way, it might also be useful to examine the delegate vs. function topic in the general forum. (I don't quite understand delegates, but some of these concepts are starting make sense for me.) |
|
Back to top |
|
|
|