• 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
RunModalForWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RunModalForWindow


  • Subject: RunModalForWindow
  • From: Tae-Won Ha <email@hidden>
  • Date: Mon, 21 Jan 2002 23:19:58 +0100

I want to run a panel modal. I instantiated a object in MainMenu.nib and
created a new nib for the panel with its window controller.

I have the following code:

- (IBAction)okAction:(id)sender
{
MyWindowController *controller = [[[MyWindowController alloc] init]
autorelease];
int runResult = [NSApp runModalForWindow:[controller window]];

if(NSRunAbortedResponse == runResult)
NSLog(@"Closed");
}

However the system says this:
2002-01-21 23:16:56.578 modal window test[398] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelec
tor:contextInfo:], NSApplication.m:2306
2002-01-21 23:16:56.585 modal window test[398] Modal session requires modal
window

What's wrong?
--
Tae. =)


  • Prev by Date: Initializing an Array
  • Next by Date: NSBrowser clearing (pt.2)
  • Previous by thread: Re: Initializing an Array
  • Next by thread: NSBrowser clearing (pt.2)
  • Index(es):
    • Date
    • Thread