Closed GoogleCodeExporter closed 9 years ago
The <select> control crashes app as well.
Original comment by czarek.t...@gmail.com
on 10 Jan 2015 at 5:21
Marshall has responed on the CEF Forum:
You need to provide a custom implementation of NSApplication that implements CrAppControlProtocol (see cef_application_mac.h). If Python implements NSApplication itself then you'll need to use a workaround similar to JCEF: https://code.google.com/p/javachromiumembedded/source/browse/trunk/src/native/util_mac.mm
Original comment by czarek.t...@gmail.com
on 10 Jan 2015 at 5:38
Fixed in revision 8ca9a32e9103.
Overwriting NSApplication and swizzling methods worked. But it was also
required to call NSApplication.sharedApplication(). For this purpose the
MacInitialize() method was exposed and is called automatically by
cefpython.Initialize().
There is one drawback for this approach. There appear errors in the console
like this:
[0111/193111:ERROR_REPORT:scoped_sending_event.mm(14)] Check failed:
[app_ conformsToProtocol:@protocol(CrAppControlProtocol)].
They are harmless. It might be possible to get rid of these errors by providing
a direct CefAppProtocol implementation:
@interface CEFPythonApplication : NSApplication<CefAppProtocol>
But the current implementation is more reliable. It will work even when some
GUI library creates NSApplication implementation on its own. This was required
in JCEF by Marshall. In wxPython this is not required, but it might be required
for other GUI libraries.
Original comment by czarek.t...@gmail.com
on 11 Jan 2015 at 7:02
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 10 Jan 2015 at 5:06