Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
[deleted comment]
Support more types for object members:
* tuple
* unicode string
Original comment by czarek.t...@gmail.com
on 11 Sep 2012 at 7:58
# Here's a prototype
class Tester:
def __init__(self):
pass
def echoMe(self, str):
return "String: [%s]" % str
def bindClass(bindings, classObject):
for name in dir(classObject):
if name[0] == '_':
continue
att = getattr(classObject, name)
class_name = classObject.__class__.__name__
if hasattr(att, '__call__'):
bindings.SetFunction("%s_%s" % (class_name, name), att)
obj = Tester()
bindClass(bindings, obj)
"""
Now you can call the method in JS like this:
Tester_echoMe("some text")
"""
Original comment by rich...@gmail.com
on 14 Sep 2012 at 11:27
Done, commit:
http://code.google.com/p/cefpython/source/detail?r=4bf59996b2b6d550e55e97004954b
ea2360c81dc
There is a new method: [JavascriptBindings].SetObject().
This feature will make it into next 0.41 release.
Original comment by czarek.t...@gmail.com
on 14 Sep 2012 at 1:26
Project will move to Github. Find this issue at the new address (soon):
https://github.com/cztomczak/cefpython/issues/4
Original comment by czarek.t...@gmail.com
on 24 Aug 2015 at 6:23
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 15 Jul 2012 at 11:44