Re: -[NSWindow parentWindow] for sheet never works?
Re: -[NSWindow parentWindow] for sheet never works?
- Subject: Re: -[NSWindow parentWindow] for sheet never works?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 26 Nov 2015 14:16:46 -0800
> On 2015 Nov 25, at 02:49, Graham Cox <email@hidden> wrote:
>
> I looked at the docs, saw [NSWindow -endSheet:sheetWindow] and totally misinterpreted it. I might be losing my mind, this sort of thing seems to be happening a lot lately.
Your mind is fine – you’ve just been using Cocoa for so long that you can predict what API are probably available :) In this case, there probably *should* be such a method, a wrapper around -[NSWindow endSheet:] which plugs in self.sheet, but in this case, Apple let you down.
* * *
One more tidbit to anyone else making the conversion to the new block-based methods. For some reason, Xcode warned me about a dozen or so NSApp beginSheet:::: methods being depredated but not about the NSApp endSheet:: methods which are also deprecated in 10.10. In a hurry, I updated the former but not the latter. Whoa! It looked good in initial testing, but then I found that a dismissed sheet would *reappear later* after a different sheet was shown! Lesson: When you update your beginSheet:::: methods, update the mating endSheet:: methods too.
_______________________________________________
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