Muliple nib files using one instance of a class

tcb_in_ecton

Registered
Does anyone know how I can have two different windows in two different nib files using the same instance of a class, rather than instansiating it in each nib file?

I have used the document arcitecture, and want the menubar and document window to use the same instance of a class

thomas
 
Hi,

I know, this answer comes really late, but do you know NSNib? You can create two nib-files and set the file's owner in both to your Class. In your class you should load the nib files via
Code:
NSNib *nib1 = [[NSNib alloc] initWithNibNamed:@"NibName1" bundle:[NSBundle mainBundle]];
[nib1 instantiateNibWithOwner:self topLevelObjects:nil];
[nib1 release];
With the second nib-file can you process in an analogous manner.
 
Back
Top