Re: Making a String from a non-NSString
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.