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

2009-06-02 Thread Michael Foord

Vadim Khaskel wrote:

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.




You have to add in place (+=) to the specific event you want to handle. 
If you want to watch a 'list' (of some sort) and perform an action on 
the combobox you will need to listen for an event on the list.


What specific class is the list you intend to use? If you find the MSDN 
documentation for that class it will show you all the events available.


Michael Foord



thank you for response,

Vadim


Message: 1
> Date: Sun, 31 May 2009 22:51:54 +0100
> From: Michael Foord 
> Subject: Re: [IronPython] how to work with delegates in IronPython
> To: Discussion of IronPython 
> Message-ID: <4a22fbfa.3010...@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Ā®. See how. 
 




___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
  



--
http://www.ironpythoninaction.com/

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


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

2009-06-01 Thread Vadim Khaskel

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 
> Subject: Re: [IronPython] how to work with delegates in IronPython
> To: Discussion of IronPython 
> Message-ID: <4a22fbfa.3010...@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___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com