• 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: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning


  • Subject: Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
  • From: "Chris Suter" <email@hidden>
  • Date: Wed, 15 Oct 2008 21:36:11 +1100

On Wed, Oct 15, 2008 at 9:03 PM, John Engelhart
<email@hidden> wrote:
>
> On Oct 14, 2008, at 7:11 AM, Chris Suter wrote:
>>
>> You can't override the type for existing methods. For example,
>> initWithString: always returns an id. You can define them as returning
>> something different but the compiler will ignore it.
>
> Just a clarification on this particular point- it is possible to override
> the type(s) of existing methods, both the argument and return types.

You're quite right.

What I meant to point out was that you can't easily override init
methods because of the problem with alloc returning id. That was
something I came across a while back which was why I got the details
slightly wrong. :-)

Sorry for any confusion caused.

-- Chris
_______________________________________________

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

  • Follow-Ups:
    • Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
      • From: "Jonathan del Strother" <email@hidden>
References: 
 >[Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: "Oleg Krupnov" <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: "Chris Suter" <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: "Oleg Krupnov" <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: "Chris Suter" <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: Graham Cox <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: "Chris Suter" <email@hidden>)
 >Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning (From: John Engelhart <email@hidden>)

  • Prev by Date: Re: executables for OSX 10.4 vs 10.5
  • Next by Date: how to complete c/s app
  • Previous by thread: Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
  • Next by thread: Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning
  • Index(es):
    • Date
    • Thread