Hi,
I'm trying to achieve loading of custom views from nib files.
I have a nib which contains NSView with some controls on it, custom object of class B which was loaded through classes tab and subsequently instantiated. And a filesOwner set to my custom class A. Class A contains a references to NSView and B and I bind this A's outlets in IB to appropriate objects.
Class A has a method to load itself from nib using loadNibNamedwner: from NSBundle.
The methods returns true which means nib was loaded successfully, but when I try to look at the fields I see that reference to NSView is populated (and I actually use it inside a form to show contents), but the reference to B is always nil.
I've also tried to stick NSObjectController and add another field to A to check if it is a matter of custom class being instantiated, but the result is the same.
Only the NSView instance is created and referenced by fileOwner.
I suggest that B's instance is never created since its init method is never called according to logging and breakpoints.
I think it is quite trivial operation that I'm doing, so I should be missing something in details or conceptually.
I'm trying to achieve loading of custom views from nib files.
I have a nib which contains NSView with some controls on it, custom object of class B which was loaded through classes tab and subsequently instantiated. And a filesOwner set to my custom class A. Class A contains a references to NSView and B and I bind this A's outlets in IB to appropriate objects.
Class A has a method to load itself from nib using loadNibNamedwner: from NSBundle.
The methods returns true which means nib was loaded successfully, but when I try to look at the fields I see that reference to NSView is populated (and I actually use it inside a form to show contents), but the reference to B is always nil.
I've also tried to stick NSObjectController and add another field to A to check if it is a matter of custom class being instantiated, but the result is the same.
Only the NSView instance is created and referenced by fileOwner.
I suggest that B's instance is never created since its init method is never called according to logging and breakpoints.
I think it is quite trivial operation that I'm doing, so I should be missing something in details or conceptually.