I have a line of code:

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

That when compiled, receives a warning:

warning: assignment from distinct Objective-C type

Now, what's odd to me, is if I change the source code to this:

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

It compiles without any warning.

The interface for the XMPPStream initializer is:

        - (XMPPStream*) initWithDelegate:(id)initialDelegate;

And, in the file that is allocating and initializing, the xmppStream variable is defined as:

        XMPPStream      *xmppStream;

So I don't see any reason that I should get the warning.
Any clues about why this happens would be appreciated.
I'm sure I must be overlooking something obvious...

This is happening with Xcode 2.4.1

[I have posted to both Cocoa and Xcode because I have no idea which list would be better for this]



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to