• 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
Newbie multiple window question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie multiple window question


  • Subject: Newbie multiple window question
  • From: Alan leigh <email@hidden>
  • Date: Thu, 3 Apr 2003 01:59:10 +1000

<Sigh>

I thought I was getting there with Cocoa. But this is killing me. I have a MainWindowController and a TestWindowController. When the user clicks a button on the main screen, MainWindowController calls:

[[TestWindowController testController] showWindow:self];

(testController is defined like this:)

+ (id)testController {
static TestWindowController *shared;
if (shared == nil) {
shared = [[TestWindowController alloc] initWithWindowNibName:@"TestWindow"];
}
return shared;
}

That seems to work, the window pops up. Then to close it, inside TestWindowController I just do a [self close]. Again that works. But now i can't get the window back by clicking the button. I've tried using orderFront and orderOut instead, but again the same thing. Works once, then can't re-open the window. Can someone please put me out of my misery and tell me just how stupid I'm being and what I'm doing wrong!?!?

Cheers,
Alan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: proper framework linking
  • Next by Date: Re: Right way to load initial data in controls when opening a window
  • Previous by thread: proper framework linking
  • Next by thread: first document based application
  • Index(es):
    • Date
    • Thread