Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 27, 2007, 12:42 AM   #1
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
Modify NIB using XCode

Hi, I am using XCode 2.4.1 with OBJ - C (Cocoa framework)
I have created an application with all required NIB's and implemented all its functionality. Its working fine.
Now my boss asked me to put a Checkbox(NSButton) and implement its functionality in a dialog.

I know how to do it in a dialog from scratch and create necessary classes (files). Now when I try to add a checkbox, its attributes and actions, all the functionality of the classes(files) will be over written. So, how can I add a new Button to a dialog now.

Thanks in advance.

satyam.
satyam90 is offline   0 Reply With Quote
Old Nov 27, 2007, 02:42 AM   #2
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Quote:
Originally Posted by satyam90 View Post
Now my boss asked me to put a Checkbox(NSButton) and implement its functionality in a dialog.

I know how to do it in a dialog from scratch and create necessary classes (files). Now when I try to add a checkbox, its attributes and actions, all the functionality of the classes(files) will be over written. So, how can I add a new Button to a dialog now.
Why would everything else be overwritten? Changing the nib should not be changing code in your class files. Just add the necessary actions to your controller class, drag the .h header back into Interface Builder, and connect the actions. And if you aren't using Cocoa Bindings, you should be; they can typically reduce the code you need to write for such things to near zero.
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Nov 27, 2007, 03:55 AM   #3
satyam90
Thread Starter
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
when NIB is ready and classes(files) are created, I am adding my own variables and functions(methods) as per my requirement. Now when I change dialog and create classes(files) again, it is showing message box to overwrite or merge.
satyam90 is offline   0 Reply With Quote
Old Nov 27, 2007, 09:47 AM   #4
Sijmen
macrumors 6502a
 
Join Date: Sep 2005
Quote:
Originally Posted by satyam90 View Post
when NIB is ready and classes(files) are created, I am adding my own variables and functions(methods) as per my requirement. Now when I change dialog and create classes(files) again, it is showing message box to overwrite or merge.
Ah, like that.

Just add the new outlets and actions in code, then re-read the files in Interface Builder (right click the class, then read headers).
Sijmen 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
iphoto modify folder hemnebob MacBook Pro 0 Feb 22, 2014 05:52 PM
What is the best program to modify the voice? hajime Mac Basics and Help 2 Nov 14, 2013 01:13 AM
Moving from xcode 3.2 to xcode 4.5.2 compilation error for 'abs' macro in stdlib.h hrishidev Mac Programming 7 Jun 2, 2013 10:36 AM
iPhone: who to modify ? Zaino Jailbreaks and iOS Hacks 5 Feb 9, 2013 09:55 AM

Forum Jump

All times are GMT -5. The time now is 04:17 PM.

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

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