• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie alert: i'm confused: The XCode Quick Tour Guide
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie alert: i'm confused: The XCode Quick Tour Guide


  • Subject: Re: newbie alert: i'm confused: The XCode Quick Tour Guide
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 8 Feb 2008 19:03:01 -0800


On Feb 8, 2008, at 18:39, George Greene wrote:

Create the HelloView class a subclass of NSView
Add a HelloView user interface element to the Hello application window
Implement he HelloView -drawRect:  method to draw the textual greeting

on page 13 -17, the author gives us the step-by-step, but the "...Tour Guide" pictures are a little dated. they don't match XCode 3.0, but general ideas hold, right?

we need to created a subclass of NSView, right?
so after creating the project, double click the MainMenu.nib

now i'm lost.

questions:
drag a custom view to the Window?
name the custom view HelloView?
create files (how)
i mean do i go back to XCode and create an Objective-C classs
or do i create a class using Write Class Files... if i use write class files how do i get XCode to i
include the files.

In Xcode 3, the communication between project builder and interface builder is a bit more streamlined, so there is slightly less to do. I'd recommend this order (although others are possible):


1. Use the project builder New File ... assistant to create a NSView subclass (one of the template options IIRC) in your project.

2. Open whatever NIB file contains your window.

3. Drag a custom view into the window.

4. Go to the, um, 6th? inspector tab, the one that lets you set the class, and change the object class from NSView to HelloView (which ought to be in the drop-down menu automatically, but type the class if not).

5. Finish writing the methods in HelloView.m if you didn't already.

6. Think of the really obvious thing I should have remembered but didn't. ;)

That should do it.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: newbie alert: i'm confused: The XCode Quick Tour Guide
      • From: George Greene <email@hidden>
References: 
 >newbie alert: i'm confused: The XCode Quick Tour Guide (From: George Greene <email@hidden>)

  • Prev by Date: wired things about NSApp Modal
  • Next by Date: What's the replacement for GetMBarHeight?
  • Previous by thread: newbie alert: i'm confused: The XCode Quick Tour Guide
  • Next by thread: Re: newbie alert: i'm confused: The XCode Quick Tour Guide
  • Index(es):
    • Date
    • Thread