View Full Version : C++ Gui

Feb 12, 2006, 05:36 AM
I went through an apple cocoa tutorial and found it quick and easy to create a user interface (to be honest didnt get the code that much, as all I know is C++ and just started OOP) and I was wondering can you do the same using xcode for a C++ app.

Feb 12, 2006, 08:37 AM
If you want to use C++ you need to look at Carbon not Cocoa.

Feb 12, 2006, 01:33 PM
Yes, you need to use Carbon if you want to program in C++, and I don't think you can use interface builder with Carbon.

However, Objective C is very easy to learn if you already know C++. It'll take you less than an hour to grasp the basics and become productive. And if you work with it for a week you'll be comfortable with the syntax and have most of the mechanisms and design patterns under control.

Feb 12, 2006, 01:40 PM
Should I just learn cocoa ?
cocoa have any benefits over carbon ?

Feb 12, 2006, 01:46 PM
If you don't want to limit yourself to Mac apps (yes, I know, I know, but there are other systems out there, really... ;)), then you could check out Qt from Trolltech (http://www.trolltech.com/products/qt/index.html), a cross-platform framework for making GUIs for C++ developers... :)

Feb 12, 2006, 01:49 PM
I think you can use Interface Builder with Carbon but I could be wrong. Cocoa and Carbon can achieve the same results but it's generally thought that it's easier for a single developer/small team to do it in Cocoa. Apple are throwing a lot of technology and development at Cocoa whereas Carbon seems to be static at the moment.

Core Data + Bindings + Interface Builder = Easy app development.

Feb 12, 2006, 08:26 PM
Yes, I'm pretty sure you can use Carbon with IB. And there's also some unholy beast called Objective-C++, which Xcode/gcc supports, so that might help you. But that said, it's still generally best to stick with Objective-C/C/Cocoa for new, native Mac apps.

Feb 12, 2006, 10:04 PM
I'm sorry. You can use Interface Builder with Carbon. I have only used it with Cocoa and assumed, since all the UI-controls in the palette were called NSSomething and only had documentation for Objective C and Java, that it was Objective C and Java only.

I tried creating a Carbon project and it does use Interface Builder, and the UI-control palette is now replaced with different controls.

I know. Never assume.