Re: C typedef for NS ptrs?
Re: C typedef for NS ptrs?
- Subject: Re: C typedef for NS ptrs?
- From: "Sean McBride" <email@hidden>
- Date: Mon, 5 Apr 2010 14:01:55 -0400
- Organization: Rogue Research Inc.
On Fri, 2 Apr 2010 16:38:48 -0500, Andy O'Meara said:
>A have a couple vanilla NS object ptrs (e.g. NSWindow*) that I have to
>pass through some cross-plaform C++ code until it ends up in a .mm file
>where where the NS object is accessed. The problem is that in the .cpp
>code, there's no obvious way to declare a NSWindow ptr so that thinks
>will link without complaint.
You could maybe use this trick:
<http://lists.apple.com/archives/cocoa-dev/2009/Dec/msg01466.html>
basically:
"The header <objc/objc.h> is a C-language header implementing the
runtime. It defines some standard types used by Objective-C, including
id. So if you include this, your headers can use the "id" data type even
if they're included from plain C++ or C files."
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden