• 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
Re: Strange Error: "NSApplication Creating more than one Application"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Error: "NSApplication Creating more than one Application"


  • Subject: Re: Strange Error: "NSApplication Creating more than one Application"
  • From: Jörn Salewski <email@hidden>
  • Date: Wed, 10 Dec 2003 12:14:57 +0100

am 10.12.2003 11:28 Uhr schrieb p3consulting unter email@hidden:

>
> I would first check who is the owner of the Nib file: what's the Class
> of the File's Owner object in IB ?
>
> maybe it is also NSApplication and then (?) the source of the problem

>
>

I just checked that. It's not NSApplication.
The nib loadig process is somewhat more complicated (and selfmade).
Here's what I do:

In my main Controller Object (the one instantiated in IB) the time the user
presses the above mentioned button I instantiate
a custom Class:

searchController = [[SKTSearchController alloc] init];

In the init method of this custom controller class the nib file is loaded as
follows:

id topLevelObjectsOfNib = [[NSMutableArray alloc] init];

id nameTable = [NSDictionary dictionaryWithObjectsAndKeys: self,
@"NSOwner", topLevelObjectsOfNib, @"NSTopLevelObjects", nil];

id nibFile = [[NSBundle mainBundle] pathForResource:@"SKTSearch"
ofType:@"nib"];

[NSBundle loadNibFile:nibFile externalNameTable:nameTable withZone:[self
zone]];

The awakeFromNib method of the SKTSearchController class then finishes
customized GUI setup. In IB naturally the File's Owner is set to be
SKTSearchController.

I do it this way to be able to free the memory used by the top level objects
in the dealloc method of this controller class; the whole thing works
perfectly under Panther. If this procedure and this code is the culprit
under 10.2.8, I don't see why.

Anything wrong with this in 10.2 (as far as I can see I don't use any
panther only classes or methods)? Any further Ideas?


Thanks,

Joern Salewski
_______________________________________________
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.

References: 
 >Re: Strange Error: "NSApplication Creating more than one Application" (From: p3consulting <email@hidden>)

  • Prev by Date: Re: Xcode style deployment: debug-symbols?
  • Next by Date: My NSQuicktimeView shows up.. once...
  • Previous by thread: Re: Strange Error: "NSApplication Creating more than one Application"
  • Next by thread: Re: Strange Error: "NSApplication Creating more than one Application"
  • Index(es):
    • Date
    • Thread