[EuroPython] Help me finalise my PyObjC talk!

Orestis Markou orestis at orestis.gr
Fri Jun 26 00:10:46 CEST 2009

I'm afraid I don't know the first thing about WebKit so I probably  
won't be of much help. I'd suggest sending a mail to pyobjc-dev, you  
are more likely to get answers there.

On 25 Jun 2009, at 20:58, Luke Kenneth Casson Leighton wrote:

> sorry, orestis, hit send too early: how to set up event listeners as
> well.  i.e. how to add a python callback onto e.g. window.resize and
> onto W3C Element (actually Node) "click" listener.
> i have an example which is using python-hulahop which is python
> bindings to XUL / Gecko, here:
> http://lkcl.net/pyjamas/python-xpcom.tgz  the key file is hula.py
> intuitively using PyObjC + cocoa, i would expect things to be pretty
> identical to this:
>        listener = xpcom.server.WrapObject(ContentInvoker(self),
> interfaces.nsIDOMEventListener)
>        self.window_root.addEventListener('click', listener, False)
> where ContentInvoker has a function handleEvent, which in the  
> example does this:
>    def handleEvent(self, event):
>        print event
> duh :)
> clue?

More information about the EuroPython mailing list