Re: Why isn't Interface Builder showing any classes from my project?
Re: Why isn't Interface Builder showing any classes from my project?
- Subject: Re: Why isn't Interface Builder showing any classes from my project?
- From: G S <email@hidden>
- Date: Sun, 9 Jan 2011 14:17:41 -0800
Thanks for the suggestions, guys.
On Sun, Jan 9, 2011 at 9:57 AM, Kenneth Wieschhoff <email@hidden> wrote:
> Check the classes in the xib file. Sounds like you've got a mis-match between the header file.
Checked it. The header file is correct.
>> If you post the actual error message, then perhaps we could offer some assistance...
Sure:
Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<UIViewController 0x4c33be0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key
debugCodeField.'
If I delete the debugCodeField's control from the XIB, it complains
about debugUnlockButton. If I delete them all, it says:
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: '-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the "Options" nib but the view
outlet was not set.'
The owning file looks like this:
@interface OptionsController : UIViewController <UITextFieldDelegate>
{
IBOutlet UITextField* debugCodeField;
IBOutlet UIButton* debugUnlockButton;
}
@property (nonatomic, retain) UITextField* debugCodeField;
@property (nonatomic, retain) UIButton* debugUnlockButton;
- (IBAction)debugUnlock:(id)sender;
And yes I'm synthesizing the properties in the implementation file.
Interface builder shows all of these connections set up properly.
I installed Xcode (3.2.5) and IB (3.2.5) at the same time, and have
been using the same setup for weeks.
>> Please verify that your nib files are properly added to the target(s) in your project. Did you open the nib files from the project, or from outside of Xcode?
Yep, they're in there, and I always open them by double-clicking in
Xcode's treeview. I added them by right-clicking in the Xcode
treeview and adding a new class derived from UIViewController, with
associated XIB file.
>If the latter, double check that you're opening the correct nib files, and not the nib files from some other project (perhaps a different copy / branch of the same product).
I don't have any other copies around (I have compressed earlier
versions only). I did find that some of the offending XIBs were in
the project directory with classes, instead of in the Resources
directory. After moving them to the Resources directory with my other
XIBs and deleting and re-adding them to the project, the drop-down
class list in the IB inspector has started showing classes from the
project. However, the key/value complaing is still happening at
runtime. I even switched the owning file's class in IB, saved it,
switched it back, saved it, and tried deleting and re-establishing all
outlets and actions. Same problem.
_______________________________________________
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