View Full Version : How to create IBOutlet NSButton interface builder

Sep 27, 2010, 01:06 PM
I am trying to add a button to an existing window that already contains a button using interface builder. However, I can't get a handle to the new button in the code.

Existing code

@interface MyFooGLView : NSOpenGLView
IBOutlet NSButton *SelectSurf0;

I want to be able to add, but don't know how to add a reference to the new button and name it MyButton.
IBOutlet NSButton *MyButton;

Sep 27, 2010, 01:11 PM
Add the definition to the interface after the existing one. Have IB resync with the file.

Sep 27, 2010, 01:32 PM
Thanks, I did that and restarted x-code and interface builder and it was there.