Hello.
I have a window controlled by a NSWindowController subclass with a standard 
nsscrollview. (Outlets are connected).
I load a custom view via a NSViewController subclass. (view outlet is 
connected).
The custom view is not visible.


@implementation AppDelegate
- (IBAction) newWindow:(id)sender {
        mwc=[[MonWindowController alloc] 
initWithWindowNibName:@"MonsterWindow"];
        
        subLayout=[[PRMLayout alloc] initWithNibName:@"StdLayout" bundle:nil];
        subLayout.view; // force view to load. Necessary?
        [mwc setPRMLayout:subLayout];
        
        [mwc showWindow:self];
        
        };
@end

@implementation MonWindowController
- (void) setPRMLayout:(PRMLayout*)layout {
        [scrollView setDocumentView:layout.view];
        };

@end

Before I added in a custom NSWindowController, the window belonged to the 
AppDelegate (standard app template with a single window connected to 
AppDelegate). The window had the standard NSScrollView.
When I added the custom view (NSViewController subclass and nib) to the 
scrollview, the custom view actually displayed.

Changing to custom NSWindowController broke this somehow.
What am I missing?

TIA
Mark
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to