On Dec 13, 2008, at 10:40 PM, Development wrote:

I am creating a window more or less from scratch in my main controller. The following is the code and all referred to objects are defined in the xib file save mainWindow which i am obviously creating.

mainWindow = [[NSWindow alloc]initWithContentRect:[mainProto frame] styleMask:NSBorderlessWindowMask
                                                                        
backing:NSBackingStoreBuffered defer:NO];

        NSRect winFrame = [mainWindow frame];
NSRect controlFrame = NSMakeRect(winFrame.size.width-650,winFrame.size.height -27, [buttonView frame].size.width,[buttonView frame].size.height);
        [docView setEditable:YES];
        [mainWindow setBackgroundColor:[NSColor clearColor]];
        [mainWindow setOpaque:NO];
        [mainWindow setHasShadow:YES];
        [mainWindow setIgnoresMouseEvents:NO];
        [mainWindow setContentView:mwContent];
        [mwContent addSubview:docScroll];
[mwContent addSubview:buttonView positioned:NSWindowBelow relativeTo:docScroll];
        [buttonView setFrame:controlFrame];
        [mainWindow makeKeyAndOrderFront:self];
        [mainWindow setInitialFirstResponder:docView];


Anyway, the window shows just fine but I cannot for the life of me get it to allow me to edit the text in the NSTextView. I am at a loss. Does any one know which step I'm leaving out here?

<http://www.cocoabuilder.com/archive/message/cocoa/2006/6/8/165272>

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to