Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

Mac losing Carbon support in 64bit Leopard

10 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

memsom

Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel. That means that Intel based Carbon based apps will only ever be 32bit and that if 32bit support is ever withdrawn (likely?) Carbon will be gone.

I know that the FPC GUI ports under Mac OS X tend to use Carbon.... anyone heard any definite reports on this? I know OS News has one, but that is allegedly still hear-say. Is it even possible/practical to use Cocoa to build a GUI and then use Pascal code to do the logic?

Apaprently Troll Tech is unhappy as they use Carbon in their Qt port for Mac OS X...

M

Reply by email

Henry Vermaak
to memsom
memsom wrote
allegedly still hear-say. Is it even possible/practical to use Cocoa to build a GUI and then use Pascal code to do the logic?

you can try and build all your functionality into an fpc dynamic lib and then link to it out of xcode. we'll need a layer to export the objective c in a way that we can use it if we're ever going to use cocoa directly. i think it contains a gazillion objects, so this is not trivial...

Show quoted text 6 lines
Apaprently Troll Tech is unhappy as they use Carbon in their Qt port for Mac OS X... M

henry

Reply by email

Florian Klaempfl
to memsom: Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel. That…
Show quoted text 7 lines
Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel. That means that Intel based Carbon based apps will only ever be 32bit and that if 32bit support is ever withdrawn (likely?) Carbon will be gone. I know that the FPC GUI ports under Mac OS X tend to use Carbon.... anyone heard any definite reports on this?

Currently, Cocoa is only usable from ObjC.

Show quoted text 6 lines
I know OS News has one, but that is allegedly still hear-say. Is it even possible/practical to use Cocoa to build a GUI and then use Pascal code to do the logic? Apaprently Troll Tech is unhappy as they use Carbon in their Qt port for Mac OS X...

Well, they have the same problem as any non ObjC user probably: using Cocoa from non ObjC languages is hard.

Reply by email

Jonas Maebe
to memsom: Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel. That…
memsom wrote
Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel.

It's not just a rumour, and it's not Intel-only. Several parts of Carbon will not be 64 bit under Mac OS X 10.5. See the "64-bit Carbon" and "Is Carbon Viable?" threads at
http://lists.apple.com/archives/carbon-dev/2007/Jun/thrd3.html

(and on the following pages)

In particular the messages from Eric Schlegel (he's from Apple), e.g. http://lists.apple.com/archives/carbon-dev/2007/Jun/msg00426.html http://lists.apple.com/archives/carbon-dev/2007/Jun/msg00433.html

That means that Intel based Carbon based apps will only ever be 32bit and that if 32bit support is ever withdrawn (likely?) Carbon will be gone.

Nobody can say how likely that is. It definitely won't happen in the near future, since there are a lot of Carbon apps out there.

Show quoted text 7 lines
I know that the FPC GUI ports under Mac OS X tend to use Carbon.... anyone heard any definite reports on this? I know OS News has one, but that is allegedly still hear-say. Is it even possible/practical to use Cocoa to build a GUI and then use Pascal code to do the logic?

Yes, it is (just as practical to do the logic in C or C++).

Jonas

Reply by email

Jonas Maebe
to Henry Vermaak: you can try and build all your functionality into an fpc dynamic lib and then link to it…
Henry Vermaak wrote 5 lines
you can try and build all your functionality into an fpc dynamic lib and then link to it out of xcode. we'll need a layer to export the objective c in a way that we can use it if we're ever going to use cocoa directly. i think it contains a gazillion objects, so this is not trivial...

You don't really have to do that, Apple already did that: http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/

And those routines can be used to build an Objective Pascal on top, to make interfacing easier. And for inspiration for that, see http://www.pascal-central.com/cwpascal.html#Extensions%20providing% 20compatibili
http://en.wikipedia.org/wiki/Objective_Modula-2

Jonas

Reply by email

Henry Vermaak
to Henry Vermaak: you can try and build all your functionality into an fpc dynamic lib and then link to it…
Henry Vermaak wrote 5 lines
On 15/06/07, memsom wrote: > allegedly still hear-say. Is it even possible/practical to use Cocoa to > build a GUI and then use Pascal code to do the logic? you can try and build all your functionality into an fpc dynamic lib

by the way, do fpc dynamic libraries work in osx? i remember that i had to use the "-install_name" option with gcc. does fpc have something similar?

henry

Reply by email

Jonas Maebe
to Henry Vermaak
Henry Vermaak wrote 9 lines
On 15/06/07, Henry Vermaak wrote: > On 15/06/07, memsom wrote: > > allegedly still hear-say. Is it even possible/practical to use > Cocoa to > > build a GUI and then use Pascal code to do the logic? > > you can try and build all your functionality into an fpc dynamic lib by the way, do fpc dynamic libraries work in osx?

Yes.

i remember that i had to use the "-install_name" option with gcc. does fpc have something similar?

You can use the equivalent linker parameter using

-k'-dylib_install_name "Your Installation Location"'

Jonas

Reply by email

Henry Vermaak
to Jonas Maebe: You don't really have to do that, Apple already did that:…
Jonas Maebe wrote 9 lines
You don't really have to do that, Apple already did that: http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/ And those routines can be used to build an Objective Pascal on top, to make interfacing easier. And for inspiration for that, see http://www.pascal-central.com/cwpascal.html#Extensions%20providing% 20compatibili http://en.wikipedia.org/wiki/Objective_Modula-2

interesting, thanks for the links.

Jonas

henry

Reply by email

Felipe Monteiro de Carvalho
to memsom: Rumour has it that the Mac OS X 10.5 will not have 64bit Carbon support under Intel. That…
memsom wrote
Apaprently Troll Tech is unhappy as they use Carbon in their Qt port for Mac OS X...

Everyone is unhappy. Office, Photoshop, Adobe products, Firefox, wxWidgets, etc, are all based on Carbon.

Actually to me it seams that Apple is the only entusiastic company about Objective C

This is sad, but at the same time isn't the end of the world, because:

* The transition to 64-bits will take time, so we have some years still where work can continue with Carbon

* Even then 32-bits carbon apps will keep working normally on 64-bits computers

* Until 64-bits GUIs are really needed we will already have some way of interfacing with Cocoa, which can be either supporting obj-c objects on Pascal or procedurizing the Cocoa API

To write stand-alone apps the first approach is 1 million times better, but, for example, to write a Lazarus interface the second is more then enougth.

Felipe Monteiro de Carvalho

Reply by email

Ingemar Ragnemalm
Felipe Monteiro de Carvalho wrote 12 lines
On 6/15/07, memsom wrote: > Apaprently Troll Tech is unhappy as they use Carbon in their Qt port for > Mac OS X... > Everyone is unhappy. Office, Photoshop, Adobe products, Firefox, wxWidgets, etc, are all based on Carbon. Actually to me it seams that Apple is the only entusiastic company about Objective C

They have lured many younger developers into the Cocoa cage, but AFAIK the big players
are not there and are unlikely to go there since they need good cross-platform solutions
and can't afford rewriting everything over and over again.

Show quoted text 11 lines
This is sad, but at the same time isn't the end of the world, because: * The transition to 64-bits will take time, so we have some years still where work can continue with Carbon * Even then 32-bits carbon apps will keep working normally on 64-bits computers * Until 64-bits GUIs are really needed we will already have some way of interfacing with Cocoa, which can be either supporting obj-c objects on Pascal or procedurizing the Cocoa API

And

* Apple might decide to make 64-bit Carbon if enough big players are unhappy with the
situation.

If that happens (even if it only happens to the modern Carbon APIs like HIView etc)
then all is well and we can go on moving forward.

If it doesn't happen, if Apple insists that Objective-C is the only path into 64-bit, then a
third path will be needed, and I think that should be a strict cross-platform solution.
That will make the Mac interface diverge more than before, but if Apple does not open
better paths it will happen.

At the moment, I would like to see more detailed information about what is actually
officially depreciated, what non-ObjC interfaces are actually ported (CG for sure,
all low-level Unix stuff etc). There is a great confusion about what "Carbon" really
is. If Apple drops QuickDraw, old Menu Manager and other old APIs, but supports
the new APIs, I won't be happy about it but at least the time I spent learning the new
ways is not wasted.

/Ingemar

Reply by email