Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a String from a non-NSString



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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.