Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Mac OS X port - status? + Carbon vs Cocoa redux

Hey,

On Monday, January 14, 2002, at 05:03 PM, Mark Allerton wrote:

Hi,
 
I've just joined the list, and have followed the thread about Maurice Parker's "blackmoon" work. Given that the last post was about a month ago I thought it was worth checking in for an update on how things were going.

Not well. I filed a bug report with Apple and it's still open. I've given up all hope for a Cocoa port.

I took a look at Maurice's project, and got it building fairly quickly (using IDEA and Project Builder) and was able to repro the Notification Center problem. It looked to me like a clash between Java GC and Cocoa reference counting - like the "ObjC end" of the NSSelector had been accidentally cleaned up. This is a problem that Apple talks about a little in the docs (for instance, see the last para of http://developer.apple.com/techpubs/macosx/Cocoa/JavaTutorial/simpleapp/Implementin_oller_Class. html.) If no progress has been made then I'm prepared to spend some time trying to debug this.

I tried everything under the sun to make sure that I didn't have an object getting collected that would cause this problem. I even asked about it on both Apple's Cocoa and Java mailing lists. The only response I got was from one guy who said, "Yep, happens to me too."

Maurice also mentioned trying to get a Carbon version up and running - and I'd be interested to hear of any progress on this.

I agree with Mike and Andre that JNI/Carbon is probably the right way to go. I haven't had much time to devote to it lately (holidays, new job, new responsibilities) but soon...

 
The one big reason for using Cocoa over Carbon that many people have given is that you "get all the nice fonts" - but I think this is actually a misunderstanding of the differences between the two. In fact it's perfectly possible to write Carbon apps that use the Quartz 2D APIs instead of QuickDraw - it's just that you don't get them by default. I've yet to look into this in as much detail as I'd like, but it seems like it' s possible to write a Carbon app every bit as good looking as a Cocoa one (I believe that the Finder is written using Carbon, for example.)

I agree completely.

 
I think that's quite enough for a first post. I'd be absolutely delighted to be proven wrong about the feasibility of using Cocoa, BTW - I have 3 years of Mac Toolbox programming under my belt from back in the early 90'
s, but I'm not all that nostalgic about it :-)

You dust the cobwebs out of that corner of your mind and I'll go and buy some books on Carbon programming. Soon we'll be back to coding pure Java with a cool widget set. :-)

-Maurice



Back to the top