New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

stuck following cocoa / xcode tutorial

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jun 30, 2008
Posts: 1
majik is on a distinguished road

majik is offline
I am following the instructions found in the Xcode Quick Tour Guide and am getting stuck right away. Step 2a says "In the MainMenu.nib window, click Classes."

I can not find a "Classes" to click on! So I was searching online trying to figure out where "Classes" should be. I came across this video clip. When they open main.nib in Interface Builder, I see a "main.nib (English)" window with "Instances, Classes, Images, Sounds, and Nib" buttons on the top of the window. The window that I get doesn't have those buttons. How do I get those buttons? I'm looking through all the menus but can't toggle these buttons. What the heck am I doing wrong?

I've got Xcode and Interface Builder v3.0.
QUOTE Thanks

xstep's Avatar
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
It looks like that tutorial is for an older version of Interface Builder. Look for an update or separate tutorial for IB 3. In the Learn Cocoa II on the Cocoadevcentral site, see how it is done now on page 9 where they are creating a subclass. Two lines down from the 'Objective-C class' highlight you would choose 'Objective-C NSView subclass'.

This is what I think I've figured out. Note I haven't used the new XCode and new Interface builder yet to any extent. I'll be looking for updated tutorials.

You seem to need to effectively do step 'e' first.

In XCode, right click Classes and choos Add--> New File...
In the list that pops up, under Cocoa, choose Objective-C NSView subclass.
Click Next on the bottom right.
Change the untitled.m file to HelloView.m and make sure the check box is checked where it says 'Also create HelloView.h".
Click Finish on the bottom right.

You then drag a Custom Siew onto the main window.
Library->Cocoa->Views & Cells->Layout Views

Finally in the Inspector window in the Identity tab (i) you chose your new HelloView class and that is it.

Given all of the above, you might find all of that confusing. I did copy the drawrect code from the tutorial into the HelloView.m file and the program did compile and run properly.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks

Post Reply New Thread Subscribe

« Odd hotkeys | Starting with XCode »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
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
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
XCode and Cocoa - unsure of how to use multiple windows together -pink- OS X - Development and Darwin 1 04-23-2008 04:36 AM
Carbon framework on XCode Rafi Shalom OS X - Development and Darwin 1 04-17-2008 01:14 PM
Xcode 1.5 alejandrico OS X - Development and Darwin 0 06-03-2006 05:56 PM
another stuck pixel!? code777 Apple Desktops 11 04-14-2005 08:52 AM
New Xcode plug-in helps developers reuse code Murlyn OS X - Development and Darwin 0 11-10-2003 12:16 PM

All times are GMT -4. The time now is 06:02 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?