• 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
Window closes on its own
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Window closes on its own


  • Subject: Window closes on its own
  • From: Alexander Reichstadt <email@hidden>
  • Date: Mon, 05 Sep 2011 09:08:32 +0200

Hi,

the window created through the following code closes on its own after one second. Why?

    PWSuggestionsWindowController *newCon = [[PWSuggestionsWindowController alloc] initWithWindowNibName:@"PWSuggestionsView"];
    [[newCon window] makeKeyAndOrderFront:self];

And the subclass of window:

- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
    self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:NO];
    if (self) {
        // Initialization code here.
    }

    return self;
}

Neither windowShouldClose is called on this occasion. It seems it is so known and obvious it is not documented any place one can easily google or find. This wasn't the case pre-10.5 though afaik.

Please, can someone shed light on this?

Thank you
Alex

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Window closes on its own
      • From: Jens Alfke <email@hidden>
    • Re: Window closes on its own
      • From: Alexander Reichstadt <email@hidden>
  • Prev by Date: Re: Best Practices for Associating a File Extension With a File in XCode 4?
  • Next by Date: Re: Window closes on its own
  • Previous by thread: Re: Knowing when font panel is visible
  • Next by thread: Re: Window closes on its own
  • Index(es):
    • Date
    • Thread