XIB-instantiated Object's IBOutlet is nil

Posted by jxpx777 on Stack Overflow See other posts from Stack Overflow or by jxpx777
Published on 2010-03-21T23:25:01Z Indexed on 2010/03/21 23:31 UTC
Read the original article Hit count: 433

I have a XIB set up like in this screenshot:

alt text

File's owner is my main window controller. The XIB is also in charge of creating an object that serves as the delegate for the MGScopeBar view. As you can see in the screenshot, the scope bar delegate has an IBOutlet for the search field so that it can return it as an extra view as part of the delegate process.

The problem I'm having is that when the delegate object is queried for the accessory view, the IBOutlet NSSearchField is nil. I'm fairly certain this has something to do with the order that objects are created, IBOutlets wired, etc, but I'm just a little lost as to where in the process I can expect the search field to exist so that the scope bar delegate can reference it properly.

Thanks in advance for any pointers.

© Stack Overflow or respective owner

Related posts about nswindowcontroller

Related posts about iboutlet