Re: Simple question: Why does this work?
Re: Simple question: Why does this work?
- Subject: Re: Simple question: Why does this work?
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 20 Aug 2003 15:22:10 -0700
On Wednesday, August 20, 2003, at 02:56 PM, Sean Todd wrote:
NSMutableAttributedString* theString = [[[NSMutableAttributedString
alloc] init] autorelease];
[theString setString:@"Hello"];
[theString appendString:@"."];
// pass the theString off to be displayed ...
Why does this work? According to the docs, the setString: and
appendString: methods are instance methods for NSMutableString and I
should have to write:
It works because NSMutableAttributedString is a subclass of
NSAttributedString. So it inherits everything from NSAttributedString...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page:
http://seiryu.home.comcast.net/
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone." - Bjarne Stroustrup
_______________________________________________
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.