• 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: Simple question: Why does this work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Simple question: Why does this work? (From: Sean Todd <email@hidden>)

  • Prev by Date: Re: Simple question: Why does this work?
  • Next by Date: RE: Icons in Help system
  • Previous by thread: Re: Simple question: Why does this work?
  • Next by thread: limits of objects
  • Index(es):
    • Date
    • Thread