 |
 |
Interface Builder and C++
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Is it possible to use Interface Builder with a program written in C++?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
I believe that would be called Carbon, and thus the answer would be yes.
Personally, I don't do Carbon. I'm working on learning Cocoa. If you are using Cocoa, then the answer would be no. The Cocoa frameworks are Objective-C. There is the possibility of using Objective-C++, in which case you can use C++ classes and Objective-C classes in the same source file. However, Cocoa calls must still be in Objective-C format.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Jun 2001
Location: Washington DC
Status:
Offline
|
|
Originally posted by Detrius:
<STRONG>Personally, I don't do Carbon. I'm working on learning Cocoa. If you are using Cocoa, then the answer would be no. The Cocoa frameworks are Objective-C. There is the possibility of using Objective-C++, in which case you can use C++ classes and Objective-C classes in the same source file. However, Cocoa calls must still be in Objective-C format.</STRONG>
I would prefer to use Cocoa, but for this particular project I'll be putting an interface onto someone else's program which was written in C++.
Is Objective-C++ a reality? I thought it was still on the drawing board or something.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Feb 2002
Status:
Offline
|
|
|
|
|
self = [[JeffBinder alloc] init];
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Apr 2000
Location: San Francisco, CA
Status:
Offline
|
|
Originally posted by nonhuman:
<STRONG>
I would prefer to use Cocoa, but for this particular project I'll be putting an interface onto someone else's program which was written in C++.
Is Objective-C++ a reality? I thought it was still on the drawing board or something.</STRONG>
If you want to use Cocoa, learn Objective C. Don't try to program Cocoa in C++. The Objective C++ compiler support is really intended to allow C++ and Objective C code to be link compatible, plus add some syntax so C++ and Objective-C objects/code can comingle where needed. Even though comingling of C++ and Objective C objects and syntax is allowed, you can not sub-class a Objective-C object in C++. That means you can't specialing, say, a NSString obhect in C++. Though you can write a wrapper, but why? You might as well program in Objective-C if you are primarily working with Objective-C objects.
If you really want to program in C++, you can program in Carbon, which is quite a good API, contrary to popularmyth on this BBS. You can even us IB with Carbon. The only disadvantage of Carbon is that it is procederal, so you'll either have to either write your own class framework (any good programmer can do this in a couple days), or use Apple's free C++ class library for Carbon (available with the MacApp distribution and is quite comprehensive). Programming in C++ does have the advantage the the language is an industry standard (meaning plenty of third party libraries to leverage - though objective C++ reduces this advantage) and skills are more marketable in the industry (though "language" is just a means to an end for any good programmer, and not the end itself).
Michael
|
|
--
Michael F. Kamprath
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|