<abirtz.RemoveThis@gmail.com> wrote:
> The object in the nib file are MainMenu, Window1, Window2, ...
> MainMenuController, Window1Controller, Window2Controller...
>
> How to change the default order such Window2 will be loaded before
> Window1 ?
> i.e. awakeFromNib in Window2Controller will be called before
> awakeFromNib in Window1Controller.
If you're concerned about this, you're doing something wrong.

There
are absolutely no guarantees about order, nor should you need any. The
idea is to use the guarantees that you *do* get. For example, you are
guaranteed that by the time awakeFromNib is called for an object, its
outlets are working.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/
Protocols/NSNibAwaking_Protocol/Reference/Reference.html
Notice that that page is quite clear on the fact that you MUST NOT rely
on any assumptions about loading order. End of story.
So, what's the *real* problem you're having? For example, if the problem
is merely that you don't want to run code in window1's awakeFromNib
until window2 is loaded and initialized, just run an outlet from the one
to the other. m.
--
matt neuburg, phd = matt.RemoveThis@tidbits.com,
http://www.tidbits.com/matt/
Leopard -
http://www.takecontrolbooks.com/leopard-customizing.html
AppleScript -
http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart.
http://www.tidbits.com