Re: Simple question: Why does this work?
Re: Simple question: Why does this work?
- Subject: Re: Simple question: Why does this work?
- From: Jörn Salewski <email@hidden>
- Date: Thu, 21 Aug 2003 01:08:08 +0200
Mmmh, really. Can't see any documentation for that. Maybe you found an
undocumented method on NSMutableAttributedString or you linked against a
3rdParty Framework that extends the capabilities of Cocoa?
JS
am 20.08.2003 23:56 Uhr schrieb Sean Todd unter email@hidden:
>
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.
_______________________________________________
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.