Re: Drag And Drop Killed By loadNibNamed

Alexander Reichstadt <[email protected]> Thu, 01 Dec 2011 12:42:49 +0100
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
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
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/macosx-dev