Loading nibs takes too long
Loading nibs takes too long
- Subject: Loading nibs takes too long
- From: Andrew Merenbach <email@hidden>
- Date: Sat, 24 Aug 2002 22:49:21 -0700
I am nearing completion of a chemical analysis program, with about
twenty-four different nib files, each with its own window. I currently
have the same number of controllers (24) defined in my MainController.h
file, and within the MainController.m file, there's an IBAction that
loads each window separately when it is needed.
Unfortunately, I've noticed that sometimes it will take a few seconds
for the first nib to load, no matter what nib file it is. A few months
ago I was still programming in AppleScript Studio, and I had it load all
the nibs right after the program launched--and it loaded them almost
instantly. Is there some reason why loading nibs seems to take longer
in pure Cocoa? Or is there a faster way to load many nibs than my code,
shown below?
- (IBAction)goPressure:(id)sender
{
NSWindow *window;
if (_controllerPressure == nil) {
_controllerPressure = [[CBPressureWindowController alloc]
initWithWindowNibName:@"Pressure"];
}
[_controllerPressure showWindow:self];
}
Take care,
Andrew Merenbach
_______________________________________________
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.