• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems wih xib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems wih xib


  • Subject: Re: Problems wih xib
  • From: Jon Hess <email@hidden>
  • Date: Mon, 5 Nov 2007 11:26:19 -0800

Hey Gordon -

I would guess that either you don't have the same custom class set on one of the controller objects (including the file's owner), or that IB isn't seeing the headers for one of the classes in one of the documents. The window outlet missing where you expect it would be a symptom of either having the wrong headers or the wrong custom class.

Did you find the cause of your problem?
Jon Hess

On Nov 3, 2007, at 2:12 PM, Gordon Apple wrote:

(Moving post as per suggestion in Cocoa-dev -- GA)

Good suggestion. The .nib is there, the only one with a solid gold
icon. Just for kicks, I tried opening some of my .nibs from the package.
All loaded, sans images, in spite of the images being in the same Resources
folder in the package, except that the inspector .nib (from the .xib)
crashes IB. I guess that could be a clue.


The inspector currently has no images, connections, or bindings. It's
just a raw panel containing two sets of tabs, each with various controls and
views.


Another fact that I forgot to mention is that the inspector wont even
launch once unless I set "visibleAtLaunch", which I don't have to do with
the other panels. Once closed, it won't open again, which the others will.
Like I said, "window" in the window controller returns nil.


(time warp .....)

Well, that's interesting. A new day, a new perspective. I just went
into IB and in my tools nib deleted the connection from file's owner
(NSApplication) to the panel. Then I couldn't put it back. I saved it and
ran it and it showed the same behavior as the xib inspector. In documents,
I always set the files owner to the document. Maybe the fact the the
application does not maintain the same type of windows list might have
something to do with it. In both cases, I set the file's owner to
NSWindowController and things now work for both panels. They must have
changed something here. I guess that's going to make a longer path for my
bindings since it looks link I'm going to have to go through the window
controller to get to the application. :-)


I just looked at the Sketch example again. They don't use xib. Their
file's owner is NSApplication and they have the "window" outlet (which does
not exist in xib) connected to their panel, like I was originally trying to
do. Apparently the xib version has lost the "window" connection for file's
owner. They also show another controller (set to NSApplication) which
doesn't appear to have any connections. Maybe losing the "window"
connection for file's owner was just an oversight in the new IB? Should I
file a bug report? (BTW, I'm still on 9a559 because I've been unable to
successfully download 9a581 and am still waiting for the disk to arrive.
I'll wait and try it again.)



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



Original Post:
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.


_______________________________________________
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
References: 
 >Re: Problems wih xib (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: Switching compilers in Xcode 3.0
  • Next by Date: Re: Accessing project images in IB Plugin
  • Previous by thread: Re: Problems wih xib
  • Next by thread: Accessing project images in IB Plugin
  • Index(es):
    • Date
    • Thread