On Nov 24, 2015, at 08:47 , Jerry Krinock <je...@ieee.org> wrote: > > In so doing, I now need the parent window in my action methods, so I can send > the -[NSWindow endSheet::] message which runs the completion handler. In > many cases, the sheet is handy but the parent window is not. No problem, I > thought, just use send -[NSWindow parentWindow] to the sheet.
I think you’ve got hold of the wrong property. The parent window (“parentWindow”) is in relation to *child* windows (addChildWindow:ordered:), which are non-sheet windows that are related to their parents in position and functionality. The parent window in relation to *sheets* is “sheetParent”. This property is fairly recent (10.9). IIRC in the old days you had to get the sheet parent more like your current workaround code is doing. _______________________________________________ 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