Re: IB Simulator gives error message: Unknown class `MyController' in nib file, using `NSObject' instead
Re: IB Simulator gives error message: Unknown class `MyController' in nib file, using `NSObject' instead
- Subject: Re: IB Simulator gives error message: Unknown class `MyController' in nib file, using `NSObject' instead
- From: Jonathan Hess <email@hidden>
- Date: Wed, 25 Jun 2008 11:30:53 -0700
Hey Thomas -
On Jun 24, 2008, at 3:48 AM, Thomas Hartwich wrote:
Hi all,
I have a strange problem with IB 3.0 on 10.5.3. I have a project
that si set
to be 2.4 compatible and in IB I see that the NIB is 2.4 format.
I added some outlets to the existing "MyController" Class .h file
and opened
the corresponding NIB in IB added text fields to the UI and
connected them
to The File's owner.
The File's owner is set to my custom class "MyController", a
subclass of
NSWindowController. I can see all the outlets and actions. I can go
back and
forth between Xcode showing the .h file and IB, no problem. I see
"MyController" in the list of custom classes.
To me it looks like the project, the .h file and the NIB are in sync.
However when I run the IB simulator I get the following error
message in the
log:
Unknown class ` MyController' in nib file, using `NSObject' instead.
And entries that it could not connect my actions. Which seems
logical, if it
does not find my class.
When you run the IB simulator, IB simulates your interface by loading
the NIB file as is. It doesn't compile your project, so classes like
"MyController" won't be available. This is expected. If you'd like to
test those classes, you should build and run in Xcode.
When I build and run the application and I call this window, on the
first
attempt I get no reaction, at the second attempt I get the window
layout,
but the fiels, e.g. TextFields are empty. I found that my
awakeFromNIB in
MyController is not called.
My question: What is wrong in IB that it does not connect to my custom
class?
Have you verified that your class file is a member of the target that
you're debugging? Try getting info on the file in Xcode, and then look
at the list of targets to verify that the expected targets are
checked. Is the method signature for your window controller "-
(void)awakeFromNib"?
Jon Hess
Thanks in advance
Thomas
_______________________________________________
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
_______________________________________________
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