Re: Interface Builder - Classes query
Re: Interface Builder - Classes query
- Subject: Re: Interface Builder - Classes query
- From: Chris Hanson <email@hidden>
- Date: Sun, 25 Nov 2007 20:15:12 -0800
On Nov 25, 2007, at 3:47 AM, Mark Vandeberg wrote:
XCode 3.0 - Interface Builder the mainmenu.nib no longer supports
the following: instances, classes, images, sounds and nib
Please be more precise in your description. It's not that "the
mainmenu.nib" that "no longer supports" those, it's that an Interface
Builder 3.0 document window no longer has tabs with those names.
therefore for example how can I subclass NSObject?
This is a FAQ that has been answered many times on this list, and on
cocoa-dev, and on the Internet.
To instantiate a class in Interface Builder 3.0, you drag an object of
the appropriate class from the Library window to your document. From
there you can set its custom class in the Identity Inspector.
So given what you ask above, you would drag an NSObject from the
Library to your document, giving you an instance of NSObject. Then
you would bring up the Identity Inspector, and change the class to
whatever you want your custom subclass of NSObject to be. You can add
outlets and actions to this custom subclass right there in the
Identity Inspector as well.
If you want to generate template files for your custom class rather
than write the files for them in Xcode, you can select an instance of
your custom class in your document and choose "Write Class Files..."
from the File menu. This will let you generate template Objective-C,
Python or Ruby code for the class of the selected object.
The only thing this doesn't do for you is ask you what target to add
the file to in your Xcode project. You'll have to do that step
manually.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden