• 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: Bilingual shenanigans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bilingual shenanigans


  • Subject: Re: Bilingual shenanigans
  • From: "Timothy J. Wood" <email@hidden>
  • Date: Fri, 13 Sep 2002 12:11:53 -0700

On Friday, September 13, 2002, at 11:19 AM, Dean Tresner wrote:

Plain.h:
class Ugly;
@interface Plain : NSObject {
Ugly y;

Be forewarned -- this will NOT call Ugly::Ugly() when -init is called on Plain. The ObjC runtime knows nothing about C++ constructors.

Additionally, the cause for your problem here (and in the 'Ugly' class) is that you are forward declaring the C++ class, but defining a real instance of it. The compiler doesn't know how big it is here, so it can't compile this code.

You either need to import Ugly.h here or change your @interface to have a 'Ugly *' instead of 'Ugly' (and then do a 'new' in your -init method).

-tim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Bilingual shenanigans
      • From: Dean Tresner <email@hidden>
    • limit text input in NSTextView
      • From: Arthur Clemens <email@hidden>
References: 
 >Bilingual shenanigans (From: Dean Tresner <email@hidden>)

  • Prev by Date: Re: contextual menu and NSTextField
  • Next by Date: Re: Scope of [NSMutableDictionary setObject:] in an array
  • Previous by thread: Bilingual shenanigans
  • Next by thread: limit text input in NSTextView
  • Index(es):
    • Date
    • Thread