[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Hello
|
Hi Greg,
I'm curious to know more of the details behind why Carbon might be
preferable to Cocoa...
Here are some of the details:
- Using Cocoa via the Java bridge is very slow; Carbon is really fast.
I have the SWT StyledText running on top of Cocoa and Carbon, and
the speed difference
is significant.
- Using Carbon from Java via JNI is stable and predictable; using
Cocoa from Java is shaky
and not predictable. I spend quite a few hours to get even simple
things to work.
- SWT is a low-level widget library which needs access to low-level
mechanisms of the platform;
Cocoa is a high level-toolkit (and in some places more of a framework).
I had a hard time to get some of SWT's low-level mechanisms right.
Some Examples:
- Cocoa's floating point coordinates and antialiasing
- SWT XOR drawing mode
- SWT applications control the event loop
- the fact that Cocoa can be used from Java directly is not an issue.
Writing JNI stubs for
Carbon toolbox functions is a no-brainer (I don't write any other code in C).
Don't get me wrong: Cocoa is one of the best toolkits available today
and I would not want to use any other toolkit to develop a standalone
application for MacOS X. However, Cocoa is not a good fit for
implementing toolkits which have a lower level of abstraction than
Cocoa. So for example I don't think that Cocoa would be of great help
for implementing X11 on MacOS X.
--andre