Re: drawing problem after multiple overlapping sheets
Re: drawing problem after multiple overlapping sheets
- Subject: Re: drawing problem after multiple overlapping sheets
- From: John Hörnkvist <email@hidden>
- Date: Mon, 10 Dec 2001 08:46:30 +0100
On Monday, December 10, 2001, at 08:24 , Alex Reynolds wrote:
Is there any way to force the OpenPanel sheet to close before the
second sheet opens? That is, is that what is causing the redraw
problems I am seeing?
You could try giving the open panel an opportunity to close; something
like this:
- (void) openPanelDidEnd: (NSOpenPanel *)sheet
returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
if (returnCode == NSOKButton) {
NSLog(@"Resource was selected for addition");
// call the second "attributes sheet" method here since we
selected a resource
[self performSelector:@selector(openAttributesSheet)
withObject:nil afterDelay:0.0];
}
else {
NSLog(@"Resource was not added");
}
}
Otherwise, [sheet close] might work.
Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com