Talk:Cocoa for EiffelVision2

Revision as of 06:59, 15 August 2006 by Dfurrer (Talk | contribs)

Mac Specifics

Several Platforms

Mac OS X currently supports at least four different processor types (that is a 32 and 64bit version of both, ppc and intel processors). Apple provides tools for compiling for all architectures and putting it all in a so called fat binary or Universal Binary. I think we should have single, simple EiffelStudio distribution that runs on all of these and has the possibility to create fat binaries from the eiffel programs it builds.

Single Menu Bar

Unlike other GUIs in Aqua there's just a single menu bar at the top of the screen and that is shared between all windows of all applications. ...

Cocoa, Carbon ???

  • Maybe we should not target Cocoa, but carbon, just like SWT: example in swt could serve as inspiration for the backend.
  • Info for [[1]]
  • Alternatively (and probably much easier) one could also make EiffelVision use the native GTK+ port instead of the X-version. But the state of Gtk+-Cocoa is unclear. (Dfurrer)

Howto

The basic approach would be:

  • to write a very simple Vision2 application only showing a window.
  • then we will have to write all implementation classes for the Vision2 widgets that will use the cocoa or carbon widgets internally
  • these will be empty at the beginning and then slowly filled
  • then one would start from the Vision2 event loop and try to fill the first implementation class, the one for the window probably
  • and from there one would go to the other widgets

This is a very interesting project as it unifies many different widget toolkits, you learn lots about the widget toolkit on OS X. But it is also tricky because the widget toolkit on top of which you are also has bugs that you have to work around. For example in carbon the Bevel button in OS X does not display correctly when it's height is set to be smaller than 20 pixels. So if you provide an interface to that button, you would have to work around that.