• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[NSWindow parentWindow] for sheet never works?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSWindow parentWindow] for sheet never works?


  • Subject: Re: -[NSWindow parentWindow] for sheet never works?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 24 Nov 2015 09:46:04 -0800
  • Feedback-id: 167118m:167118agrif8a:167118sjB99_p4RM:SMTPCORP

On Nov 24, 2015, at 08:47 , Jerry Krinock <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: -[NSWindow parentWindow] for sheet never works?
      • From: Jerry Krinock <email@hidden>
References: 
 >-[NSWindow parentWindow] for sheet never works? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Swift - internal class conforming to public protocol
  • Next by Date: Re: Swift - internal class conforming to public protocol
  • Previous by thread: -[NSWindow parentWindow] for sheet never works?
  • Next by thread: Re: -[NSWindow parentWindow] for sheet never works?
  • Index(es):
    • Date
    • Thread