Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 27, 2010, 01:06 PM   #1
dbrayford
macrumors member
 
Join Date: Feb 2010
How to create IBOutlet NSButton interface builder

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
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.
Code:
IBOutlet NSButton *MyButton;
dbrayford is offline   0 Reply With Quote
Old Sep 27, 2010, 01:11 PM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Add the definition to the interface after the existing one. Have IB resync with the file.
robbieduncan is offline   0 Reply With Quote
Old Sep 27, 2010, 01:32 PM   #3
dbrayford
Thread Starter
macrumors member
 
Join Date: Feb 2010
Thanks, I did that and restarted x-code and interface builder and it was there.
dbrayford is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Interface Builder WTF. SolarShane Mac Programming 2 Mar 12, 2014 02:38 AM
Pashua gui tool interface elements anything similar in xcode interface builder wild4life2013 Mac Programming 1 Aug 10, 2013 08:13 PM
OpenGL ES without interface builder? blueshogun96 iPhone/iPad Programming 1 Feb 10, 2013 01:04 PM
Im having a bit of an issue with interface builder adildacoolset iPhone/iPad Programming 5 Oct 12, 2012 12:51 PM
Interface Builder Crashes Every Time wickerman1893 iPhone/iPad Programming 5 Jun 29, 2012 06:57 AM

Forum Jump

All times are GMT -5. The time now is 04:53 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC