<div><span class="gmail_quote">On 10/25/07, <b class="gmail_sendername">Dermot Hogan</b> &lt;<a href="mailto:lists@ruby-forum.com">lists@ruby-forum.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">You can&#39;t say<br><br>x = new EventHandler(mymethod)</blockquote>
<div>&nbsp;</div>
<div>I was trying to avoid writing this, but my inner pedant simply won&#39;t let go.&nbsp; There&#39;s a difference between delegates and events.&nbsp; A delegate is simply a bound function pointer, and it&#39;s perfectly legal to do a straightforward assignment as above.&nbsp; An event is basically a published endpoint to which you subscribe and unsubscribe by adding and removing your delegate.&nbsp; The two are obviously related but not the same, and what we seem to be talking about here specifically involves events.
</div>
<div>&nbsp;</div>
<div>I feel much better now. :)</div>
<div>&nbsp;</div>
<div>--</div>
<div>Curt Hagenlocher</div>
<div><a href="mailto:curt@hagenlocher.org">curt@hagenlocher.org</a></div></div>