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 Oct 29, 2007, 10:37 AM   #1
garethlewis2
macrumors 6502
 
Join Date: Dec 2006
Ib 3

Simple scenario, single document interface program. Not MDI.

IB 2, you create the class Contoller by subclassing NSObject in the Classes tab.

IB 3. There is no classes tab, so you can't create the controller class that way anymore. How are you supposed to do this now?
garethlewis2 is offline   0 Reply With Quote
Old Oct 29, 2007, 11:19 AM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Drag over an Object:

Attachment 89329

Last edited by kainjow; Mar 3, 2008 at 02:49 AM.
kainjow is offline   0 Reply With Quote
Old Oct 29, 2007, 01:41 PM   #3
eulerthegrape
macrumors newbie
 
Join Date: Oct 2007
Analog to the built in tutorial

I am a total n00b and ran into a similar issue to the OP. Apple issued the "Xcode Quick Tour Guide" with Xcode 3.0 but, seemingly, uses Interface builder 2.0. I'm trying to mindlessly follow the tutorial to create a hello world app but quickly hit a wall. It won't let me drag the object icon and change its type.

They say to:

1. Open MainMenu.nib in Interface Builder
2. Create the HelloView class:
a. In the MainMenu.nib window, click Classes.
b. in the tree view, select NSObject > NSResponder > NSView.
c. Choose Classes > Subclass NSView.
d. Change MyView to HelloView and press Return.
e. choose Classes > Create Files for HelloView.
etc.

1. is their an updated tutorial somewhere that uses InterfaceBuilder 3 or can someone with the tutorial take a look and show me how to implement this program with the new InterfaceBuilder. I would really appreciate any help as I was really excited about trying out Xcode and I'd hate to stop now before I got started.

-Pete
eulerthegrape is offline   0 Reply With Quote
Old Oct 29, 2007, 01:57 PM   #4
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by eulerthegrape View Post
a. In the MainMenu.nib window, click Classes.
b. in the tree view, select NSObject > NSResponder > NSView.
c. Choose Classes > Subclass NSView.
d. Change MyView to HelloView and press Return.
e. choose Classes > Create Files for HelloView.
In Interface Builder 3, try:

1. In the Library window (Tools > Library), select Library > Cocoa, then scroll to Custom View (second to last row).
2. Drag the icon for Custom View into your nib, alongside File's Owner, First Responder, Application and MainMenu.
3. Select your view, go to the Identity Inspector (Tools > Identity Inspector), and change the Class from NSView to HelloView.
4. Choose File > Write Class Files...
kainjow is offline   0 Reply With Quote
Old Oct 29, 2007, 02:44 PM   #5
eulerthegrape
macrumors newbie
 
Join Date: Oct 2007
Building in Xcode issue

OK, that was very helpful I think the key there is where to add the new custom type (alongside the File's Owner, First Responder etc.). Now I added a Custom View to the window and changed it's type to HelloView. I added these files to my Xcode project (is there another way to do this than going into finder and pulling the HelloView.h and .m files over?) but when I opened the files the .m file it was empty and the project would not compile. Sorry if this is trivial.
eulerthegrape is offline   0 Reply With Quote
Old Oct 30, 2007, 04:44 AM   #6
garethlewis2
Thread Starter
macrumors 6502
 
Join Date: Dec 2006
Got it working.

Completely different to previous versions of IB.

Next month I am going to be slapping down $500 to get ADC select then find every single piece of information there is on Leopard development.

It does make sense now, but it is confusing. I had to create the ConverterController class and Converter class in XCode, basically empty. Then drag both header files along to IB3 so when I added the two NSObjects, I could select the type they were. That is going to cause a lot of headaches with developers used to XCode 2.
garethlewis2 is offline   0 Reply With Quote
Old Oct 30, 2007, 07:58 AM   #7
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by garethlewis2 View Post
Next month I am going to be slapping down $500 to get ADC select then find every single piece of information there is on Leopard development.
I don't know if you'll need to do that now. It seems like they are opening up more of the articles and documentation to the public and I'm sure in a month's time there will be even more available. But if you're going to WWDC 08 it's worth it
kainjow is offline   0 Reply With Quote
Old Apr 19, 2008, 03:34 PM   #8
benuaq
macrumors newbie
 
Join Date: Mar 2008
Sorry for replying on such an old/dead thread, but I'm having real trouble with this.

I've been following this tutorial:
http://www.cocoadevcentral.com/d/learn_cocoa_two/

I've got to section 12, "Add Header to NIB"
I follow the suggestions you guys have made, about making a new Custom View and dragging across the .h file

I can't tell if anything has happened after dragging the file across, as nothing seems to change.

If I change the "Class" section of my new Custom View to the class AppController, it makes the error sound and goes back to being blank.

I would really appreciate any help, I've been writing mac apps for almost 2 hours now, I'm such a noob xD
benuaq 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Help! 3rd party apps crash after downgrade from iOS 5 to 4.3.3 summero iPhone Tips, Help and Troubleshooting 3 Jun 13, 2011 01:40 AM
iOS 4.3.3 for iPod touch 4th generation caspersoong iPod touch 5 May 9, 2011 11:23 AM
iOS 4.3.3 out soon [BGR] dethmaShine iPhone 4 May 2, 2011 12:34 PM
Interface Builder Sync Problem (Xcode/IB 3.2 & Snow Leopard 10.6.2) Darkroom iPhone/iPad Programming 8 Jun 1, 2010 03:57 PM
Updated books for Xcode/IB 3 grimreaper1377 Mac Programming 4 Nov 2, 2008 06:52 PM


All times are GMT -5. The time now is 02:20 PM.

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

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