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 > Mixing Carbon and Cocoa.

Mixing Carbon and Cocoa.
Thread Tools
Senior User
Join Date: Feb 2001
Location: Rochester, uk
Status: Offline
Reply With Quote
May 28, 2001, 04:36 AM
 
I'm about to start learning Cocoa (when my exams are over, in a week or two). But I've heard that there are things that Cocoa just can't do - like file Type/Creator codes, resource forks... stuff from the old Mac that hasn't come over yet. Is this true?

If it is true, how easy would it be to mix pieces of Carbon code in there to do those things? Is Carbon essentially straight C, or C++?

All words are lies. Including these ones.
     
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 28, 2001, 10:40 AM
 
Yep, check out devworld.apple.com -> source code for an example of Cocoa with Carbon.
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
May 28, 2001, 01:09 PM
 
You shouldn't use ResourceForks for *your* application. However, I'm planning on making a nice wrapper for ResourceForks using the Resource Manager Carbon calls...

Most Carbon is straight C, though, so you can just call it from your Cocoa code. The Apple example is for C++ mainly, but I don't think there anything in Carbon that you can't do with C (although most people use C++ because it's easier to think about - OOP and so on ).
     
   
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 03:15 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