Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Is anyone actively working on the SWT Cocoa bindings?


On Mar 27, 2008, at 10:17 AM, Clayton Hicklin wrote:
I would think one of the primary benefits is that the Carbon API is
seemingly "going away" and will not be supported on 64-bit
architectures.  Apple has pretty much signaled that future development
for OSX should utilize the Cocoa API.

Not only that, but Java 6 on OS X will be 64-bit only, and will not support the current 32-bit Carbon SWT. If you want an RCP app that runs in Java 6 you're out of luck right now. 

We should also get better looking controls, since just about all UI improvements are being done in Cocoa.


On Thu, Mar 27, 2008 at 11:43 AM, Randy Hudson <hudsonr@xxxxxxxxxx> wrote:
Is there any chance of seeing new styles or widgets in SWT which gracefully
degrade on other platforms?  Or perhaps are emulated like Coolbar is on
Mac?  Looking briefly at what's available in Cocoa and some possibilities
are:
ToolItem: SWT.ICON (== FLAT?)
Toolbar: SWT.SCOPE, SWT.CAPSULE(or "ROUND")
Button:  SWT.BEVEL (== ETCHED?), SWT.GRADIENT, SWT.ROUND

I know what Steve's going to say:  "Open a bugzilla and attach a patch".
But I'm just wondering where the line is when it comes to supporting
"hints" that only have a meaning on a single platform.  In other words, are
there patches that wouldn't even be considered?

One way to handle this is to use the SWT's Widget.setData/getData methods to attach properties to widgets, much like Apple did with Swing controls in Leopard. See <http://developer.apple.com/technotes/tn2007/tn2196.html> for the details. This would let us add options or variants for particular platforms that don't require method-level API changes.

In the example you gave above, that would do the job nicely because in Cocoa you can easily change a button style after it is created, but it won't work for things like windows where the type has to be known at creation time.

Scott
------------------
Scott Kovatch
Cupertino, CA




Back to the top