• 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
confused about inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

confused about inheritance


  • Subject: confused about inheritance
  • From: Ivan Kourtev <email@hidden>
  • Date: Wed, 29 Mar 2006 15:22:18 -0500

Hi,

NSMutableCharacterSet inherits from NSCharacterSet which has a + characterSetWithCharactersInString method. Why then does the statement

NSMutableCharacterSet *cs = [NSMutableCharacterSet characterSetWithCharactersInString:@"#"];

produce an "initialization from distinct Objective-C type" warning?


By the same logic, I would expect

NSMutableString *s = [NSMutableString stringWithString:@"A"];

to generate a warning yet it does not.

What am I missing here?

Thanks,

--
ivan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: confused about inheritance
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: disk image making
  • Next by Date: Re: confused about inheritance
  • Previous by thread: Question about sheets...
  • Next by thread: Re: confused about inheritance
  • Index(es):
    • Date
    • Thread