URL:
  <http://savannah.gnu.org/bugs/?24950>

                 Summary: Calling [NSApplication init] mulitple times causes
an NSException on GNUstep
                 Project: GNUstep
            Submitted by: gcasa
            Submitted on: Wed 26 Nov 2008 04:07:33 PM EST
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

On Mac OS X the following code does not cause an exception:

//
//  GSTableView.m
//  TestDesignatedInit
//
//  Created by Gregory Casamento on 11/23/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "GSTableView.h"


@implementation GSTableView
- (id) initWithFrame: (NSRect)frame
{
        NSLog(@"initWithFrame was called.");
        return [super initWithFrame: frame];
}

- (void) awakeFromNib
{
        id app = [NSApplication init];
        NSLog(@"Awake from nib called. %@",app);
        app = [NSApplication init];
        NSLog(@"Awake from nib called. %@",app);
        app = [NSApplication init];
        NSLog(@"Awake from nib called. %@",app);
}
@end

It appears to return the same singleton instance over and over.   While I 
know we shouldn't call init multiple times, we should consider making it
behave consistently with Cocoa.

GC




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24950>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to