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

Re: Categories


  • Subject: Re: Categories
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 4 May 2002 17:22:14 -0700

On Saturday, May 4, 2002, at 05:10 PM, Nat! wrote:


Yeah, that is true.

I wasn't sure if NSConcreteMutableData was a sub-class of NSMutableData or not (it doesn't have to be).

yes it does

It does? I could be wrong but..

Things come back by way of an id out of init (initWithSomething) and hence could be anything. As long as it responded to the message I send it things will be fine.

Basically I can do the following...

id someThing;
someThing = [NSMutableData dataWithBytes:[myString cString]
length:[myString length]];

[id getBytes:someBuffer];

and...

NSThread stupidBut;
stupidBut = [NSMutableData dataWithBytes:[myString cString]
length:[myString length]];

[((id) stupidBut) getBytes:someBuffer];


The compiler type checking will not complain about the above.

-Shawn
_______________________________________________
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: Categories
      • From: Charles Srstka <email@hidden>
References: 
 >Re: Categories (From: Nat! <email@hidden>)

  • Prev by Date: Re: Categories
  • Next by Date: Re: Categories
  • Previous by thread: Re: Categories
  • Next by thread: Re: Categories
  • Index(es):
    • Date
    • Thread