Thanks... I found the solution:
1. import the NSView class in AppDelegate.m (something like #import "Curve.h")
2. create
@Property IBOulet (nonatomic, weak) of the NSView (like *customView)
3. from the .xib file create a
@Property (nonatomic, weak) in @interface and a @IBAction in @implementation of AppDelegate.m from the button (or any controlctrl-dragging the object into the code
4. in the AppDelegate.h IBAction communicate to the methods of the NSView clwriting in the function with something like [self.customView customViewMethod:argument];
5. finally in the IBAction execute [self.customView setNeedsDisplay:YES];
Et voilà!
I hope this could help someone else...