• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C typedef for NS ptrs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >C typedef for NS ptrs? (From: Andy O'Meara <email@hidden>)

  • Prev by Date: Re: Preservation of State
  • Next by Date: Bindings & ivars
  • Previous by thread: Re: C typedef for NS ptrs?
  • Next by thread: Why doesn't -[NSArrayController selection] et al fire keyPathsForValuesAffectingKey?
  • Index(es):
    • Date
    • Thread