FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delegates

 
Post new topic   Reply to topic     Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
brad
Site Admin


Joined: 22 Feb 2004
Posts: 490
Location: Atlanta, GA USA

PostPosted: Mon Apr 12, 2004 1:00 pm    Post subject: Delegates Reply with quote

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
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Mon Apr 12, 2004 11:38 pm    Post subject: Delegates Reply with quote

I found a couple threads of possible usefulness in the official newsgroup:

Listener interfaces instead of delegates (Ant's DUI)
Walter's original delegate proposal
Back to top
View user's profile Send private message AIM Address
brad
Site Admin


Joined: 22 Feb 2004
Posts: 490
Location: Atlanta, GA USA

PostPosted: Tue Apr 13, 2004 7:11 am    Post subject: Reply with quote

Thanks. I'll take a look.
_________________
I really like the vest!
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Tue Apr 13, 2004 9:31 pm    Post subject: Delegate Info Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tutorials All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group