[Mono-osx] [MonoMac] Adding WebKit DOM interfaces

Miguel de Icaza miguel at novell.com
Thu Nov 18 17:44:45 EST 2010


> I'd like to get some help about binding Private interfaces and protocols.

I can certainly try to help you, but we wont be adding private bindings
to MonoMac, since those are internal APIs that can change between OSX
versions and we would not be doing our users any favors by binding
those.

In addition, Apple wont allow apps that use private APIs on the Mac
AppStore. 

> What missing here is `WebView.MainFrame.FrameView.DocumentView' which 
> should be of type `WebDocumentView'.  Unfortunately, it throws an 
> InvalidCastException at me when I try to evaluate the last property 
> accessor: `FrameView.DocumentView'.  So I'm puzzled.

I see the bug here.   DocumentView is returning a WebDocumentView that
really does not exist as a class, that is a mistake in the binding.

The return value should be NSView, I will fix that.   The problem is
that you likely want to get to the WebDocumentView methods, but those
are part of the protocol.

There are no publicly documented classes that adopt the protocol, so
this might be a case where we need to add support for interfaces sooner
rather than later.

For now I changed it so that we return an NSView, it is still up to the
user to manually invoke any methods from WebDocumentView's methods.
Not sure how we will do that.

Geoff and myself will discuss this over the weekend.


Miguel



More information about the Mono-osx mailing list