C++ Gui

Discussion in 'Mac Programming' started by MacDonaldsd, Feb 12, 2006.

  1. macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #1
    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.
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    If you want to use C++ you need to look at Carbon not Cocoa.
     
  3. macrumors 603

    gekko513

    Joined:
    Oct 16, 2003
    #3
    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.
     
  4. thread starter macrumors 65816

    MacDonaldsd

    Joined:
    Sep 8, 2005
    Location:
    London , UK
    #4
    Should I just learn cocoa ?
    cocoa have any benefits over carbon ?
     
  5. Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #5
    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, a cross-platform framework for making GUIs for C++ developers... :)
     
  6. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    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.
     
  7. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #7
    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.
     
  8. macrumors 603

    gekko513

    Joined:
    Oct 16, 2003
    #8
    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.
     

Share This Page