On Wed, Mar 19, 2008 at 4:12 PM, Jeremy [EMAIL PROTECTED] wrote:
Hi.
I am just starting to learn Cocoa and would like to use standard C++
classes from my Objective C/C++ classes.
You really don't. You think you do (probably because you know C++),
but then you enter the crazy messed up world
Without starting a religious war, I have to disagree with this.
ObjC++ is probably a bad idea if you are a novice programmer in general,
but I think it also has some really good things going for it, and having
written huge amounts of ObjC++ code, I think it's perfectly
straightforward to use.
On Mar 20, 2008, at 10:32 AM, Rob Napier wrote:
Say you have a C++ object called MyObject in the namespace myapp
that you want to access through your ObjC. What I tend to do is
create an ObjC++ object called MyObjectWrapper that owns a
myapp::MyObject and presents a pure ObjC interface to
On Thu, Mar 20, 2008 at 11:33 AM, Christopher Nebel [EMAIL PROTECTED] wrote:
On Mar 20, 2008, at 10:32 AM, Rob Napier wrote:
Say you have a C++ object called MyObject in the namespace myapp
that you want to access through your ObjC. What I tend to do is
create an ObjC++ object called
Yep, stringWithUTF8String/UTF8String works well for std:string. I recommend
creating NSStringForStdString() and StdStringForNSString() utility
functions, and possibly an NSString category to add -stdStringValue.
-Rob
On Thu, Mar 20, 2008 at 4:05 PM, Jeff LaMarche [EMAIL PROTECTED]
wrote:
What
On Mar 20, 2008, at 2:34 PM, Jeremy wrote:
Thanks everyone!
Using a void* for the member variable of my wrapper class did the
trick and I now have my Objective C code calling my C++ code!
What is the best way to pass strings from my Objective C code to my C
++ code though?
I started
Hi.
I am just starting to learn Cocoa and would like to use standard C++
classes from my Objective C/C++ classes.
Is there any known documentation on how to do this, or does anyone
have any pointers?
I tried creating a new object of my C++ class and calling a method on
it in a .m file
Are you #including the header which declares MyClass?
Jeremy wrote:
Hi.
I am just starting to learn Cocoa and would like to use standard C++
classes from my Objective C/C++ classes.
Is there any known documentation on how to do this, or does anyone
have any pointers?
I tried creating a