Doesn't matter. I've figured out that it's not the secondary nib that's the problem but the document nib.
It seems that the
Code:
- - (void)windowControllerDidLoadNib:(NSWindowController *) aController
doesn't do what I says and not everything in the nib has completely loaded when it gets called.
I was trying to display a sheet to appear when a new document was created or opened (something like that anyway. I can't be bothered to explain fully
).
I thought that if I put the [NSApp beginSheet: etc:] message in the windowControllerDidLoadNib method then the sheet would appear after the nib had loaded and it would 'stick' to the window. Why doesn't that work.
Anyway, I fixed it by putting it in a menu so the nib would of loaded by then anyway.