[SOLVED]RE: Re: Close a alert sheet programatically
[SOLVED]RE: Re: Close a alert sheet programatically
- Subject: [SOLVED]RE: Re: Close a alert sheet programatically
- From: "Peter Karlsson" <email@hidden>
- Date: Thu, 6 Jan 2005 12:59:50 +0100
Thanks a lot, this works:
[NSApp endSheet:[myWindowOutlet attachedSheet]
returnCode:NSAlertDefaultReturn];
Peter
Ursprungligt meddelande
> On 06 Jan 2005, at 12:47, Peter Karlsson wrote:
>
> > I have tried this:
> >
> > [NSApp endSheet:[self window] returnCode: NSAlertDefaultReturn];
> >
> > But I get a error when building saying:
> >
> > MyController may not respond to -window
> >
> > What is the problem here?
>
> Whoops. You should probably not use [self window]. Call
> -endSheet:returnCode: with the sheet window. To get a window's attached
> sheet, you use [myWindow attachedSheet] (replace myWindow with the
> window the sheet is attached to).
>
> Sorry for the confusion.
>
> Regards,
>
> amon-re
>
> --
> mail: email@hidden
> web: http://www.amonre.org/
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden