Question

I have a XIB set up like in this screenshot:

alt text http://emberapp.com/jxpx777/images/interface-builder/sizes/m.png

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.

Was it helpful?

Solution

Per Apple's documentation, it looks like all of the outlets in a NIB/XIB are supposed to be wired before awakeFromNib is called on any object in that NIB/XIB, but that outlets probably are not wired when init, etc., are called on the objects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top