Re: Problems with xib
Re: Problems with xib
- Subject: Re: Problems with xib
- From: Jon Hess <email@hidden>
- Date: Fri, 2 Nov 2007 17:11:13 -0700
Hey Gordon -
On Nov 2, 2007, at 1:23 PM, Gordon Apple wrote:
I'm having issues with an inspector panel I created in IB. I have
several panels launched from the application level using the same
techniques
shown in the Sketch example. The .nib files work properly, show/
hide works,
etc. However, it does not work properly with the inspector panel,
which is
the only .xib file I have.
I am using generic window controllers and the code in my
application
delegate is identical for each window. As in Sketch, the delegate
adds a
category for the window controllers with "isWindowShown" and
"showOrHideWindow". The inspector window will bring up the panel,
but the
menu does not change to "Hide Inspector" and will not close it. If
it is
closed from the window, it cannot be re-launched. No such problems
with the
.nib windows. The window settings in IB are identical for each
panel, as is
the code.
Tracking in the debugger shows that once the inspector is launched,
"window" in the category returns nil, which explains why it won't
work.
What I don't understand, is why it is nil. Again, the only
difference is
the use of .xib rather than .nib. It looks to me like there is a
bug in the
internal translation from .xib to .nib. I tried saving and using
a .nib
with the same result. However, since it does launch, it doesn't
make much
sense that "window" would be nil, unless the "release when closed" is
getting set, regardless of its unchecked status in IB.
Can you verify that your interface is indeed being loaded? When Xcode
compiles your project, all of your XIB's are converted to NIB's, it
might worth checking to see that the XIB is being compiled in into a
NIB in the built product successfully. I would go look inside of the
application package that is produced by Xcode and verify that there is
indeed a nib in the place where you expect to load one from.
Jon Hess
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
@mac.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden