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?
_______________________________________________
EuroPython mailing list
EuroPython@python.org
http://mail.python.org/mailman/listinfo/europython