Re: Cross-platform toolkit with a Cocoa backend
Re: Cross-platform toolkit with a Cocoa backend
- Subject: Re: Cross-platform toolkit with a Cocoa backend
- From: "Dr. Rolf Jansen" <email@hidden>
- Date: Tue, 10 Jul 2007 11:22:23 -0300
Am 10.07.2007 um 09:00 schrieb Felipe Monteiro de Carvalho:
On 7/10/07, Dr. Rolf Jansen <email@hidden> wrote:
If you are looking at this from the point of view to find a
viable replacement for Carbon for Mac port of Lazarus, then you are
IMHO quite possible on the wrong track - I would suggest to stick
with the Carbon toolkit at the Mac side and use whatever toolkit for
Windows and X.
Well, the idea would be writing a lazarus port with cocoa.
I would love to stick with Carbon, it is really a great framework and
worked very well until now. The problem is that based on recent news,
as well as discussion on the mailling list I got the fealing that
Carbon has no future, and thus I should start all new projects on
Cocoa.
The term framework is indeed used for Carbon and Cocoa, but beside
that they are totally different.
Carbon is basically a framework of tools and was in former times
simply named the toolbox. As such it is really great for porting
crossplatform stuff to the Mac. You simply take the tools out of the
box that you need and leave aside what you do not need or want.
Cocoa on the other hand is what others would name a class library
and the classes are sorted in a very descent hierarchy. That means,
you do not simply draw a button like with Carbon and then do whatever
you like with it. With Cocoa you attach a NSButton to the window, and
you get all the Cocoa behaviour with that. In Carbon the Button is
(more or less) dead and you have to bring it to life with your code.
In Cocoa the button lives already and you only can bring it to dead
with extra code, which does not fit into to Cocoa way of doing things
And start cocoa versions of the carbon projects, to be prepared
for the future, just in case this proves true.
I cannot see how this might work, other than starting a Cocoa-Lazarus-
Project from the scratch, but this might be more a problem of my
limited iaginative power. How about trying to replace a Carbon button
by a Cocoa button, in this process you will see how far it takes and
if it is sufficient for the whole project.
And even if it doesn't prove true, this work would be useful when we
need to use functionality that only exist for Cocoa, like the menubar
extras class.
This is another story. You can establish a single self consistent
behaviour from Cocoa, without basing your whole project on it.
Also, Lazarus already works with native 64-bits Windows, native
64-bits Linux (and others unixes as well). We won't restrict our
native Mac port to 32-bits. (AFAIK the 64-bits Carbon version was
dropped by Apple).
I would see it like this. Carbon is the latest step in the evolution
of the Mac toolbox and it contains all the ancient genes from 1984,
and with that it evolved into a immovably big and heavy and hungry
Dinosaur. What happend with the Dinos? Yes, the Dinos themselves are
dead, but 90 % of its genes are still there, look at all the small
and beautiful birds.
I would not count on 64bit Carbon, because it does not make sense to
make the whole Dino into 64bit. I would however count on the
availability of a native 64bit widget toolbox at some point in the
future. We are simply reaching the end of the Jurrasic area (Mac
Classic toolbox and the Carbon period) and starting in the new
hopefully prosperous Cretaceous (Chalk) area.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden