We have been creating our own decendant of NSViewComponent to get some custom cocoa classes going. At first it did not seem to work as all what was shown was a black frame. We of course thought that was our own fault but when trying to embed the WebbrowserComponent we had the same result, as someone already found out. http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=2900&highlight=webbrowsercomponent
For some reason i had the idea that it might had to-do with the main window not having a native title bar and voila after setting this to true it all worked. So were happy now, but this needs a fix of course.
That’s puzzling - I can’t think how this could be a fault of the framework. Having a title bar just sets the window style, and isn’t used anywhere else… I’ll have a think, but it feels like it’s probably the webview itself making assumptions about the window it’s being put into.
It’s not the title bar in my opinion… I have done some testing and found out that the WebBrowserComponent works perfectly well if it’s set directly as the content component of a window, while it paints only a black window if I add it to a Component which serves as the content component.
[quote=“yfede”]It’s not the title bar in my opinion… I have done some testing and found out that the WebBrowserComponent works perfectly well if it’s set directly as the content component of a window, while it paints only a black window if I add it to a Component which serves as the content component.
Jules, can you help?[/quote]
If that was true, then the browser page in the juce demo wouldn’t work either.
Maybe you could send me some code that reproduces the problem?
Maybe something’s going wrong because you’re initially adding it to a zero-sized component - try setting up the window’s size before you add the browser comp?