[3 / 1 / ?]
Quoted By:
How do you set a NSWindow delegate?
When I try, I get the following warning and note:
>main.m:87:25: warning: sending 'NSView *' to parameter of incompatible type 'id<NSWindowDelegate> _Nullable'
>[myWindow setDelegate:myView];
^~~~~~
>/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework>/Headers/NSWindow.h:327:49: note:
> passing argument to parameter 'delegate' here
>@property (nullable, weak) id<NSWindowDelegate> delegate;
My code is
>NSView *myView;
>. . .
>[myWindow setDelegate:myView];
When I try, I get the following warning and note:
>main.m:87:25: warning: sending 'NSView *' to parameter of incompatible type 'id<NSWindowDelegate> _Nullable'
>[myWindow setDelegate:myView];
^~~~~~
>/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework>/Headers/NSWindow.h:327:49: note:
> passing argument to parameter 'delegate' here
>@property (nullable, weak) id<NSWindowDelegate> delegate;
My code is
>NSView *myView;
>. . .
>[myWindow setDelegate:myView];