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

Yellowstone2012

macrumors regular
Original poster
Feb 3, 2011
108
0
I have "IBOutlet WebView *theWeb;" and I get the following error: "Unknown type name WebView.

What does this mean?
 
He's right

chown33 is right (whatever happened to chowns 1 - 32?). A few other notes (I don't know how far along you are in your Cocoa journey):

IBOutlet just tells Xcode that you may want to hook up your object to something in a NIB file.

WebView is the name of that class that your object is an instance of. Per chown33, Xcode needs to know what a WebView is by including it your list of frameworks (normally only the UIKit and Foundation frameworks are included by default), and then you must import that framework (WebKit) into the .h file you're working on.

* means that the next variable is really a pointer to an object.

theWeb is the name of the object. You'll use this name later on to create and display things, probably web pages. You can name this anything, Cocoa convention is to start with a lower case and use upper case for each succeeding word. For instance you could have two objects:

IBOutlet WebView *mySecretPornWebPage;
IBOutlet WebView *myAdorableKittensWebPage;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.