Re: Drag And Drop Killed By loadNibNamed
SD <macosxdevlist-LS+HbC+WUqxt2bImrQXijVaTQe2KTcn/@public.gmane.org> Thu, 1 Dec 2011 17:55:43 -0800
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <p0624080fcafde00b865c@[172.16.32.166]> |
Subclassing and using NSWindowController worked, thank you. Specifically: MyNSWindowController *m = [[[MyNSWindowController alloc] initWithWindowNibName:@"myNib"] autorelease]; [m window]; SD ______________________________________________________________________ Previous message on 12/1/11 at 12:42 PM +0100 ********************************************************************** >I remember to have run into the same problem. Somehow the window was >not present early enough. I ended up using NSWindowController's > >[[yourwindowcontrollersubclass >alloc] initWithWindowNibName:@"YourNibNameWithoutExtensionNib"] > >which worked. > > >Am 01.12.2011 um 11:25 schrieb SD: > >>Hello all, hope you can help. >> >>My application loads a window from a nib and then displays it. >> This window has a Text View (NSTextView in NSScrollView). >> >>When the window is loaded from a nib using: >> >>[NSBundle loadNibNamed:@"nibfilename" owner:m]; >> >> >>dropping text (using drag and drop) on the NSTextView doesn't work. >> >>It doesn't seem to matter how I show the window once I load the >>nib. Have it show via "Visible At Launch", show using >>makeKeyAndOrderFront, show using beginSheet. >> >>If I copy the window into my main nib show it, then drag and drop >>works fine. Does anyone have any ideas why the drag and drop is >>getting killed when I use loadNibNamed. >> >>Thank you. >>_______________________________________________ >>MacOSX-dev mailing list >><mailto:[email protected]>[email protected] >>http://www.omnigroup.com/mailman/listinfo/macosx-dev