• 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: warning: assignment from distinct Objective-C type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: assignment from distinct Objective-C type


  • Subject: Re: warning: assignment from distinct Objective-C type
  • From: Ron Fleckner <email@hidden>
  • Date: Tue, 11 Mar 2008 19:42:33 +1100


On 11/03/2008, at 7:19 PM, Stuart Malin wrote:

I have a line of code: 

xmppStream = [[XMPPStream alloc] initWithDelegate:self];

That when compiled, receives a warning:

warning: assignment from distinct Objective-C type

Not sure of the actual reason, but if you both forward declare the class in your header like:

@class XMPPStream;

and then import the XMPPStream.h in the implementation file of the class in which you use *xmppStream, like:

#import "XMPPStream.h"

then the warning will go away in my experience.

HTH,
Ron
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >warning: assignment from distinct Objective-C type (From: Stuart Malin <email@hidden>)

  • Prev by Date: warning: assignment from distinct Objective-C type
  • Next by Date: Re: Linking to third-party Frameworks and dylibs from a plug-in
  • Previous by thread: warning: assignment from distinct Objective-C type
  • Next by thread: Re: warning: assignment from distinct Objective-C type
  • Index(es):
    • Date
    • Thread