Re: Modal dialog without NSApplication
Re: Modal dialog without NSApplication
- Subject: Re: Modal dialog without NSApplication
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 18 Sep 2008 17:32:23 +0200
Le 18 sept. 08 à 16:15, brodhage a écrit :
Hi,
thank you very much for your quick answer, Jean-Daniel.
> If you want a complexe dialog...
Yes. So I guess CFUserNotification does not help.
> I don't understand why using NSApp for this kind of works will
have an impact on the remaining of you application though.
Just because a lot of my code handles common task - and it is not
guaranteed that there is a NSApplication at all.
For example let's take a plugin for a carbon application - here
there is no NSApplication.
In theorie, you can safely call NSApplicationLoad() to instanciate an
NSApplication before you use it, even in a Carbon App plugin (and then
create you own auto release pool).
In practice, there is some issues when running a modal Cocoa windows
in a Carbon App (I remember some carbon-dev messages about it).
But it's worth the try.
And: using NSApplication would mean to bind the code only to
applications and to name all files ".mm" instead of ".cpp" - not
usable if you want to build that under Win.
You don't have to name all files .mm, only the one that uses Cocoa
(tthe one that is already Mac OS X specific). And both Visual Studio
and Xcode provide some options to force the type of the file (to tell
VS to compile .mm as .cpp or to tell Xcode to compile some cpp file as
mm).
_______________________________________________
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