Re: NSAlert::runModal doesn't work on 10.6
Re: NSAlert::runModal doesn't work on 10.6
- Subject: Re: NSAlert::runModal doesn't work on 10.6
- From: Andreas Falkenhahn <email@hidden>
- Date: Tue, 23 Aug 2016 19:56:07 +0200
On 23.08.2016 at 19:30 email@hidden wrote:
> You don't have to have a nib unless your plist says you will.
Is that your personal opinion or is this documented anywhere?
Apple's documentation of NSApplicationMain() clearly states that
this function "loads the main nib file from the application's main
bundle." Consequently, this means that the behaviour of NSApplicationMain()
without a main nib file in the app bundle is undefined. It may work
now but it can break at any time because the documentation doesn't
say that the nib file is optional. So it could happen that with the
next OS X update all hell will break loose if NSApplicationMain()
suddenly chooses to fail if there is no nib. Such a choice would
be fully valid since the documentation clearly says that it expects
a main nib in the app bundle...
I'm just exaggerating here to point out the dilemma that we have
because these things aren't documented and it's all just assumptions.
Hence, using NSApplicationMain() without a nib is no better than
ditching NSApplicationMain() altogether and setting up things in
a custom way. Both are undocumented and just based on assumptions.
Thus, both may fail at any time in the future.
--
Best regards,
Andreas Falkenhahn mailto:email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden