• 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
panel can't open sheet two times?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: newbie EXC_BAD_ACCESS
  • Next by Date: What's up with UI interaction and NSMutableArray+NSAutoReleasePop()?
  • Previous by thread: Re: Creating a large Cocoa project - tutorials? - OT: underscore use
  • Next by thread: What's up with UI interaction and NSMutableArray+NSAutoReleasePop()?
  • Index(es):
    • Date
    • Thread