Re: delegate of an NWindowController's window

2011-09-29 Thread Koen van der Drift
On Sep 29, 2011, at 9:03 PM, Conrad Shultz wrote: > > An alternate approach, depending on the details of your > implementation, might be to make use of some of the other parameters > in that lengthy -beginSheet... method; setting appropriate values for > didEndSelector (and, potentially, contextI

Re: delegate of an NWindowController's window

2011-09-29 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/29/11 5:38 PM, Koen van der Drift wrote: > This all goes fine, the sheet opens and I get generate the data, > stored in an NSDictionary in MyDataWindowController. Now I want > somehow to get the data back to MyAppDelegate. So I am trying this >

Re: delegate of an NWindowController's window

2011-09-29 Thread Graham Cox
You're overthinking the problem. NSWindowController doesn't have a 'delegate' method or property, which is the cause of the warning you are receiving. Using a delegate to handle the result from a sheet is reasonable - it's what I invariably do. But you have to add that delegate property yoursel

Re: delegate of an NWindowController's window

2011-09-29 Thread Koen van der Drift
Thanks for the response, but, still not working. Here's in more detail what I'm trying to do. My main window is controlled by MyAppDelegate: @interface MyAppDelegate : NSObject In MyAppDelegate I respond to an IBAction to open a second window to generate some data that needs to be go back

Re: delegate of an NWindowController's window

2011-09-29 Thread Ken Thomases
On Sep 29, 2011, at 5:38 PM, Jamie Pinkham wrote: > On Sep 29, 2011, at 6:22 PM, Koen van der Drift > wrote: > >> I'm trying to get the delegate of a window that is controlled by a custom >> NSWindowController as follows: >> >> NSWindow *win = [self window]; >> id del = [win deleg

Re: delegate of an NWindowController's window

2011-09-29 Thread Jamie Pinkham
The NSWindow delegate's type is id not id . This is the compiler telling you the types don't match. Sent from my iPhone On Sep 29, 2011, at 6:22 PM, Koen van der Drift wrote: > I'm trying to get the delegate of a window that is controlled by a custom > NSWindowController as follows: >