Re: Mixing Carbon & Cocoa?
Re: Mixing Carbon & Cocoa?
- Subject: Re: Mixing Carbon & Cocoa?
- From: Steve Bennett <email@hidden>
- Date: Thu, 07 Feb 2002 12:15:33 -0500
Mitch Haile <email@hidden> wrote:
>
>
I have an app that's mostly written with PowerPlant as a Carbon target. For
>
the Mac OS X build, I'd like to add a few windows that only work with Cocoa
>
because I want to take advantage of some specific Cocoa things that are just
>
painful to do with Carbon (text editing panels).
>
>
Am I doomed here? Should I redo the whole interface in Cocoa? (Yikes...).
As far as I know, you can have a Cocoa app make many Carbon calls, but
because the top level event loop handling is different, you can't have a
Carbon app call anything in Cocoa. You *might* be able to hack the
PowerPlant classes to let them run within a Cocoa app, but I think that
would be a whole lot of work.
That said, I wouldn't necessarily say "Yikes" to a rewrite in Cocoa. For
various reasons, we are right now rewriting a Carbon PowerPlant app in
Cocoa. We're mostly done now, taking about half the total time we had
estimated. (And we estimated pretty low because we had the old code as a
reference...) Half of that time was doing a detailed design spec and some
proof of concept work, since we hadn't really done any Cocoa work before.
It went fairly smoothly except for a couple of weird issues with popup menu
controls and sheets we're still working out. And in the process, since we
could, we cleaned up our algorithms, fixed some design issues, and produced
much better documented, cleaner, and more robust code. I'm very happy with
the results.
So unless your app is *really* huge, needs to run on 9 (doubtful, or you
wouldn't want to use Cocoa for parts anyway), or you are under heavy time
pressure, you might want to seriously consider a rewrite. Spend a week and
see how far you get - you might be surprised.
-->Steve Bennett
_______________________________________________
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.