[IronPython] Users Digest, Vol 59, Issue 1 /how to work with delegates in IronPython/

Vadim Khaskel vkhaskel at hotmail.com
Tue Jun 2 02:59:23 CEST 2009


Michael,

here is my scenario:

I have a list - messageBuffer that captures messages. Once this list gets a new message, event generated and combobox ads

a new item.

based on your example 

my combobox will do: self._comboBoxA.Event += function 

Is this just "Event" or any specific event, I understand that you wrote it in general form.

thank you for response,

Vadim


Message: 1
> Date: Sun, 31 May 2009 22:51:54 +0100
> From: Michael Foord <fuzzyman at voidspace.org.uk>
> Subject: Re: [IronPython] how to work with delegates in IronPython
> To: Discussion of IronPython <users at lists.ironpython.com>
> Message-ID: <4A22FBFA.3010407 at voidspace.org.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Vadim Khaskel wrote:
> > Hello everybody,
> >
> > Could somebody help to setup simple delegate in IronPython.
> >
> > I just need to generate event when list structure gets filled with data,
> 
> The standard technique is:
> 
> # check delegate signature
> def function(sender, event):
>     # do something
> 
> instance.Event += function
> 
> What is the list event you want to hook up to?
> 
> Thanks
> 
> Michael Foord
> >
> > and update GUI element.
> >
> > thanks a lot,
> >
> > V.
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090602/cecb40b8/attachment.html>


More information about the Ironpython-users mailing list