Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Muncher

macrumors 65816
Original poster
Apr 19, 2007
1,465
0
California
I've been trying for a while to get the example at this website running. I've gotten up to the part where it tells me to "drag the AppController.h file to the nib document window in Interface Builder." I drag it, when my mouse is hovering over the Document window a green plus appears. Then I drop it, and nothing happens. The file is a header with a perfectly valid class that builds fine.

What am I doing wrong?!!

Contents of file:
Code:
#import <Cocoa/Cocoa.h>

@interface AppController : NSObject {
	IBOutlet id textView;
}

- (IBAction) clearText: sender;

@end
 

wlh99

macrumors 6502
Feb 7, 2008
272
0
I've been trying for a while to get the example at this website running. I've gotten up to the part where it tells me to "drag the AppController.h file to the nib document window in Interface Builder." I drag it, when my mouse is hovering over the Document window a green plus appears. Then I drop it, and nothing happens. The file is a header with a perfectly valid class that builds fine.

What am I doing wrong?!!

Contents of file:
Code:
#import <Cocoa/Cocoa.h>

@interface AppController : NSObject {
	IBOutlet id textView;
}

- (IBAction) clearText: sender;

@end

I think the problem is that you are using Xcode 3.x, and the example is for Xcode 2.5. I have been fighting the same issues, some examples are for 2.5, and others from 3.x.

Try this (from memory, I'm at work so I may be wrong) From one of the menu's select "read class file" and read your .h file. Then drag an NSObject from the library to the Document window. It should let you do that. Then open the inspector, and change the object type to AppController.

There is a tutorial where you build a CurrencyConverter that is for Xcode 3.x. It's a good place to start if you are having the same problems as me.
 

Muncher

macrumors 65816
Original poster
Apr 19, 2007
1,465
0
California
Haha! It works! Thank you so much for the quick response. I finished up the tutorial, I think I get it now!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.