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 > Carbon API stuff

Carbon API stuff
Thread Tools
Mac Elite
Join Date: Jun 2000
Location: Pasadena
Status: Offline
Reply With Quote
Jun 27, 2001, 08:02 PM
 
I'm guessing this topic has been discussed before, but I haven't the time to weed through it, so if an admin can point me to a link, that'll be great too...
Anyway, my delimma is that I need to write a program (having to do with processing the published data of the Human Genome Project), and since I don't plan on changing the Macs at the company to OSX, I need to write the API in Carbon, so it'll be compatible with 8.x-10.x or whatnot. From what I gathered in the last day or so, CodeWarrior Pro 6 is possibly the best compiler out there for Carbon (and Apple's own Project Builder is best for Coca...but I've been a little disappointed with the performance of Coca apps under OS X, which is another discussion).
Now, my question is, what is the best book to teach me how to program the Carbon API...the ONLY book I can find so far is one written by some Apple guy, titled Carbon, and I know MacTech should be releasing the Carbon edition of Mac Programming in late September or later...any other books/ideas?
Also, I'm thinking of doing this in C, its something I should know well anyway since its probably used more often when interfacing with Assembly for EEs (which is my major actually). But if there's some significant downside to it, or significant upside to using C++, Java, or whichever language that Apple had/has, let me know please, thanks.
G4/450, T-bird 1.05GHz, iBook 500, iBook 233...4 different machines, 4 different OSes...(9, 2k, X.1, YDL2.2 respectively) PiA to maintain...
     
Mac Elite
Join Date: Jan 2001
Location: New York
Status: Offline
Reply With Quote
Jun 29, 2001, 11:14 PM
 
You may want to try out "Learning Carbon" from O'Reilly. I'm not sure who the book is oriented to though, but it has got the support of Apple.
     
Mac Elite
Join Date: Jun 2000
Location: Pasadena
Status: Offline
Reply With Quote
Jun 29, 2001, 11:30 PM
 
yeah, bought a copy of that,since it seems to be the only one out so far...rather introductory book that'll probably serve its purpose for a month or so...maybe better books will be out by then ^_^
G4/450, T-bird 1.05GHz, iBook 500, iBook 233...4 different machines, 4 different OSes...(9, 2k, X.1, YDL2.2 respectively) PiA to maintain...
     
Mac Elite
Join Date: Jan 2001
Location: New York
Status: Offline
Reply With Quote
Jun 30, 2001, 10:27 PM
 
For new development you should be using Cocoa anyway. Trust me, what they say is true.
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jul 1, 2001, 03:19 AM
 
Originally posted by davecom:
<STRONG>For new development you should be using Cocoa anyway. Trust me, what they say is true.</STRONG>
Stop spreading FUD. Carbon is a perfectly capable API. He also stated that his program needs to run on Mac OS 8 & 9 as well, and I don't see any Cocoa libraries for Classic.
     
Mac Elite
Join Date: Jan 2001
Location: New York
Status: Offline
Reply With Quote
Jul 1, 2001, 12:34 PM
 
Sorry, I didn't reread the first post, my bad.
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Jul 2, 2001, 03:15 PM
 
The O'Reilly book is unfortunately oriented squarely at Carbon developers using Project Builder. This is unfortunate because PB can't build apps that will work on OS 8 or 9.

Might still be useful as another view on the Carbon API, and you might be able to port a PB project to CodeWarrior.

Also note that if you use some of the fancier features of Carbon (Nib support, perhaps?), you'll only be able to support 8.6 forward. At least, last I heard, 8.6 was the cut-off for using Carbon past CarbonLib 1.0.1, or some such. (I'm probably confusing the numbers a bit, but it's something like that...)
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jul 3, 2001, 01:06 PM
 
I think Nib support is OS X only, as is CoreGraphics and several other technologies you can call from Carbon (you can also use CoreFoundation IIRC, e.g. the XML parsing tools, and that's OS X only too).

Carbon Events is CarbonLib 1.2+, so you won't be able to use them on OS 8.1...

CarbonLib 1.0.1 is the last to support OS 8.1
CarbonLib 1.3.1 and 1.4 support OS 8.6+
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Jul 3, 2001, 11:56 PM
 
Actually you can use lots of Core Foundation stuff in 9. CFStrings, the CF containers ... I'm 90% sure I used some XML parsing code on 9, but I could be mis-remembering. (And I'm also rather sleepy ... hmmm. Shouldn't post when not awake .... ) I thought I remembered seeing/hearing about nib support in 9, but maybe not.

But yeah, CoreGraphics will likely never be back-ported to CarbonLib (though I hear someone's trying to replicate the API by hand using Quickdraw). Similarly for LaunchServices, and some other random things which depend on X-specific features or environments...

Ugh. must sleep. Can we get a sleeping smiley? I suppose the cool one could do in a pinch. My eyes are closed under those shades.
     
Fresh-Faced Recruit
Join Date: Aug 2001
Location: Toronto, ON
Status: Offline
Reply With Quote
Aug 26, 2001, 11:58 AM
 
I am pretty sure that it is possible to write OS 9-friendly Carbon apps in Project Builder, only it takes a lot of know-how (which I lack). There are a whole suite of Carbon routines for reading nib files (and all of Carbon is available on OS 8.6+ with CarbonLib), and there is a way to change the runtime target to CFM instead of Mach-O, though I couldn't tell you how to do it, and I'm seriously annoyed at Apple for not making a good tutorial on that. There is a short document in the Apple tech docs about Core Foundation, and how it enables an app to be deployed on OS X and OS 9, so CF is, as another poster suggested, critical. I myself have abandoned OS 9 and Carbon altogether in favour of Cocoa, because figuring out how to do dual-deployed apps was too frustrating. Further, it seems to me like a lot of users who are Carbon-ready will be amenable to OS X when it stabilizes.

OS 8.6 wasn't that long ago, so people using it will either buy new machines or upgrade to X soon enough. I find Carbon primarily useful in the scheme of things as a way to enable porting of C and C++ code from Windows; but with Obj-C++ in the pipe, maybe that will be a moot point too.

theEnigma

[ 08-26-2001: Message edited by: theEnigma ]
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 26, 2001, 01:27 PM
 
Originally posted by theEnigma:
<STRONG>I am pretty sure that it is possible to write OS 9-friendly Carbon apps in Project Builder, only it takes a lot of know-how (which I lack). There are a whole suite of Carbon routines for reading nib files (and all of Carbon is available on OS 8.6+ with CarbonLib), and there is a way to change the runtime target to CFM instead of Mach-O, though I couldn't tell you how to do it, and I'm seriously annoyed at Apple for not making a good tutorial on that. </STRONG>
No, you can't create CFM apps with project builder. The compiler PB uses is GCC, and that doesn't know CFM, only Mach-O.
     
   
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 12:26 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