Plugin NSView


First, I’m new to Cocoa & Mac OS.
I’m developing a plugin. On Windows, all’s work fine.

But on MacOs:

I have NSView of application container for my plugin, let’s call it “containerView”.

I try following code:
MyComp *comp = new MyComp();



NSView* pluginView = (NSView*) comp->getWindowHandle();

comp->setTopLeftPosition(0, 0);

[contentView addSubview:pluginView
positioned: NSWindowAbove
relativeTo: nil];

And I get TWO views. One in contentView window and other on the desktop.
What I’m doing wrong?


afaik, you shouldn’t have to do any specific objectiveC to generate plugin windows. Take a good long look at the stuff in the Examples folder and follow the patterns illustrated in those examples for creating a plugin