Simple question: Why does this work?
Simple question: Why does this work?
- Subject: Simple question: Why does this work?
- From: Sean Todd <email@hidden>
- Date: Wed, 20 Aug 2003 16:56:34 -0500
I have found the following to compile cleanly and run without any
problems:
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:
[[theString mutableString] setString:@"Hello"];
[[theString mutableString] appendString:@"."];
What am I missing? I am compiling with gcc 3.3 (and have the flag to
treat all warnings as errors set).
Thanks,
Sean
_______________________________________________
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.