• 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
newbie alert: i'm confused: The XCode Quick Tour Guide
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: newbie alert: i'm confused: The XCode Quick Tour Guide
  • From: George Greene <email@hidden>
  • Date: Fri, 8 Feb 2008 21:39:25 -0500

the first example, i can't figure out.


From "The XCode Quick Tour Guide" the author tells us the behavior that's to be implemented and in general terms what needs to happen to do it.


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.


from the tutorial:

implementation file method;


-(id)initWithFrame: (NSRect)frameRect { if ( ( self = [ super initWithFrame: frameRect] ) != nil ){ // Add initialization code here } return self; }

-(void) drawRect:(NSRect)rect
{
	NSString *hello = @"Hello, World!";
	NSPoint point = NSMakePoint(15, 75);
	NSMutableDictionary *font_attriubtes = [NSMutableDictionary new];
	NSFont *font = [NSFont fontWithName:@"Times" size: 42];
	[font_attributes setObject:font forKey:NSFontAttributeName];

	[hello drawAtPoint:point withAttributes:font_attributes];

	[font_attributes release];
}


my question is how do i get this to work?

thanks,

g.
_______________________________________________

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: Quincey Morris <email@hidden>
  • Prev by Date: Re: Using NSFileHandleConnectionAcceptedNotification for a server process
  • Next by Date: wired things about NSApp Modal
  • Previous by thread: [Update]: Curious about NSHashTable
  • Next by thread: Re: newbie alert: i'm confused: The XCode Quick Tour Guide
  • Index(es):
    • Date
    • Thread