Re: Application behaving strangely after displaying a sheet
Re: Application behaving strangely after displaying a sheet
- Subject: Re: Application behaving strangely after displaying a sheet
- From: Bruno Blondeau <email@hidden>
- Date: Mon, 05 Nov 2001 00:32:06 +0100
>
On Sunday, November 4, 2001, at 09:25 pm, Bruno Blondeau wrote:
>
>
> [NSApp beginSheet:mySheet
>
> modalForWindow:[myTextView window]
>
> modalDelegate:self
>
> didEndSelector:NULL
>
> contextInfo:NULL];
>
>
> modalVal = [NSApp runModalForWindow:mySheet];
>
>
I don't think that you should use runModalForWindow with a sheet.
>
Instead, use the didEndSelector in [NSApp beginSheet:]
>
There is a very simple tutorial on using sheets over at
>
http://www.cocoadevcentral.com
Thanks. I managed to fix the problem by avoiding using both -beginSheet and
runModalForWindow.
The code above was actually copied from one of your "competiter" :-)
(www.cocoadev.com).
I should be more careful with my sources... (and Apple should provide better
documentation & especially more sample code...)
Bruno