panel can't open sheet two times?
panel can't open sheet two times?
- Subject: panel can't open sheet two times?
- From: OS <email@hidden>
- Date: Mon, 21 Mar 2005 00:17:09 +0100
Hi, I'm opening a sheet in a panel--I know it's been discussed it it's
appropriate or not before, and for me it is this time--and the first
time the sheet opens correctly, but if I close it, and try to open
again it doesn't work, I just get the system alert sound. Here's the
code I'm using:
- (IBAction)raisePlayerSettingsWindow:(id)sender
{
// I first open the panel because it might be closed
[playerWindow makeKeyAndOrderFront:sender];
[NSApp beginSheet:playerSettings
modalForWindow:[webView window]
modalDelegate:self
didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:)
contextInfo:NULL];
}
- (IBAction)closePlayerSettingsWindow:(id)sender
{
[playerSettings orderOut:sender];
[NSApp endSheet:playerWindow returnCode:1];
}
- (void)sheetDidEnd:(NSWindow *)sheet
returnCode:(int)returnCode
contextInfo:(void *)contextInfo
{
// pass
}
I just don't see what's wrong (plus, it doesn't print any kind of error
anywhere), I'm using the same method as Hilegass in his book, and it
works for him!
thanks!
OS
_______________________________________________
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