• 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: Making a String from a non-NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a String from a non-NSString


  • Subject: Re: Making a String from a non-NSString
  • From: Michael Becker <email@hidden>
  • Date: Tue, 27 Jan 2004 20:37:15 +0100

if ([ currentKey isEqualToString:@"Archive Path"]) // THIS, however, produces a runtime error "[ XMLTree -isEqualToString:] selector not found"

Yes, because XMLTree != NSString.


Yeah, I think I was just confused because I thought an "NSString* aString" declaration would genuinely produce an NSString (or a pointer to an NSString, that is).

Though it *does* seem kind of weird that XMLTree wouldn't have a method that returns its name, if its description returns such a name. Make sure you didn't just miss it before relying on description, because IIRC there are no guarantees as to the format of its value.


As a matter of fact, XMLTree does implement its own description-method. Apparently that method does exactly what I want (return an NSString* containing the "data" in "<tag>data</tag>"). I guess I was just a little confused because the manual that comes with XMLTree has the following example:

NSString* father = [ xmlTree childAtIndex: 1];

But apparently the -description method is supposed to deliver the strings within the current tags.
So, problem solved. Thanks to all who replied! :-)

Bye,
Michael
_______________________________________________
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: 
 >Making a String from a non-NSString (From: Michael Becker <email@hidden>)
 >Re: Making a String from a non-NSString (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: Notification when a view goes offscreen?
  • Next by Date: Re: [APP IDEA] Desktop Background Scripting
  • Previous by thread: Re: Making a String from a non-NSString
  • Next by thread: Re: Making a String from a non-NSString
  • Index(es):
    • Date
    • Thread