Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > For the record...

For the record...
Thread Tools
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Dec 30, 2000, 04:10 PM
 
1) Can you access Cocoa and other OS X specific stuff (BSD sockets) from a CFM executable or does it have to be Mach-O (i think the latter but someone I know said it can be done with CFM)
2) Does Carbon actually run on top of the Cocoa libraries or is it separate?
     
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Jan 1, 2001, 05:44 PM
 
2) I really think that carbon is a totally separate API that isn't based on cocoa. the reason for this is because of the behavior of things. For example, think about windows. All Cocoa windows support live window resizing. This isn't always true with Carbon, although it is in the Finder. Also, You can't resize a Cocoa window below the last few pixels on the screen, while a carbon app doesn't have that restriction. Try resizing a window in the Finder and then try resizing something like a window in Omniweb and you'll see what I mean. Actually that is a good way to see if a program is Cocoa or a Nib based carbon app since both use package formats.

Basically, if apple was going to map stuff in Cocoa to that in carbon they wouldn't take the time to make things like that different. Also, think about it: the Cocoa frameworks aren't available in OS 9, and Cocoa apps dynamically link to them. I just don't think that Carbon lib is going to provide the type of runtime system that is needed for apps to link to a Cocoa framework. It could be that the API's for OS9 are compiled into the program and those for OS X are dynamically linked, as needed, but then windows and stuff should behave the same for Carbon and Coco apps and that just isn't true.

So I'd really doubt that Carbon is just a wrapper for the Cocoa API.
     
Dedicated MacNNer
Join Date: Oct 1999
Status: Offline
Reply With Quote
Jan 2, 2001, 12:29 AM
 
Originally posted by Angus_D:
1) Can you access Cocoa and other OS X specific stuff (BSD sockets) from a CFM executable or does it have to be Mach-O (i think the latter but someone I know said it can be done with CFM)
You can access dyld libs from a CFM executable.

The CFM wrapper allows calls to Mach-O libs, however not vice versa (according to the Apple docs I read). For example you couldn't make a CFM lib and expect a Cocoa app to use it.

You can compile Mach-o carbon apps, of course.


2) Does Carbon actually run on top of the Cocoa libraries or is it separate?
Cocoa and Carbon are just libs. Pieces of code you can use in any combination so long the file structures are the correct format. You can write an app which uses both or doesn't use either. In fact Apple's music player app is a CFM carbon app with Mach-o window manager which uses a PDF to draw the window.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:22 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2