I have a carbon application that displays several windows.
I am adding a feature to display another window and I would like to use the
nice Cocoa NIB stuff to make my life easier, but I cannot seem to get the
Cocoa NIB to load properly from my carbon code.
I get an error on the CreateWindowFromNib call, it returns -10, and I have
only seen ONE reference to this error for this function in all my searches,
what does this error mean and can I even get a full featured Cocoa NIB to be
displayed using Carbon APIs in manner attempted below?
Failing that, is there any better documentation about the differences
between Carbon and Cocoa NIBs (other than the obvious: Carbon requires an
explicit handler and Cocoa does not).
I do not want to call the NIB functions from Carbon (as is done in the
sample), I want the Cocoa NIB to handle all messages and have control return
to the function below after the user is finished interacting with the Cocoa
window/dialog. The window/dialog will update things (data etc...) as
needed, and the calling function below does not need to know what was done
at all.
The Nib "MyNib" and the window "MyWindow" in the nib do exist.