Re: IB 3.0
Re: IB 3.0
- Subject: Re: IB 3.0
- From: Scott F Bayes <email@hidden>
- Date: Wed, 14 Nov 2007 13:45:26 +0900
On Nov 14, 2007, at 13:18 , Jon Hess wrote: Yes. You should select your view, and then use the identity inspector to change the custom class of the view to 'SOSView'. If the green light is showing up in your document window and you have a .h file in your project that defines SOSView, then this should work. What's the base class of SOSView? Is there a header for that class? Just to be clear, you don't need to drag and drop any header files that are in your project, and you shouldn't have to manually use the "Synchronize with Xcode" menu item.
It's a direct subclass of ScreenSaverView, and ScreenSaver/ScreenSaver.h is imported. I only drug and dropped the .h header to IB when the class didn't show up in IB. Same with using Synchronize, just prodding it. IB associates a document with a project as soon as the document's file is referenced by a project. If you just created a nib in IB, save the NIB to disk, and then use Xcode to add a file reference to the file you just created. At that point, the green light will come on. This is all more seamless if you start by creating a new nib in Xcode.
I had added it to the project with Project > Add to Project... before I posted the original email. It showed up in the Nib group (and also in the Classes list, which concerns me a bit). I may build a brand new project and pour the text into that, do a new nib. Not difficult. You should be able to set the custom class of File's Owner with the identity inspector just like you do for other objects. Control+drag to connect will only work if IB knows about your header files. Once IB finds your headers, this should work as described.
This is where it fell apart. IB pretended not to know, but when I typed SoSView into the Identity inspector Class field, it suddenly knew about a particular IBOutlet in the class, so it certainly knows about the class. But even after that, I could not see SoSView in the Class list. I agree, this would have been a great document to have.
Great minds think alike :-) My guess would be that your base class to SOSView is described in a header that isn't in your Xcode project. IB won't know about that header and then it won't know that SOSView is a distant subclass of NSView. That will cause SOSView to not appear in the combo box. If worse comes to worst, you can always just type in the class name directly into the combo box. Just because the class name isn't in the combo list doesn't mean you can't pick it. If IB still doesn't find your action and outlet definitions you can enter them manually into the two table views immediately below the combo box where you declare the custom class.
SoSView.h does show up in the class (it was generated from the New Project Assistant, so unless that's busted, it should be well-known for free. I'm beginning to think the Project or nib may be damaged.
ScottB
|
_______________________________________________
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
References: | |
| >IB 3.0 (From: Scott F Bayes <email@hidden>) |