Re: Inconsistencies with NSString in GDB
Re: Inconsistencies with NSString in GDB
- Subject: Re: Inconsistencies with NSString in GDB
- From: Mike Shields <email@hidden>
- Date: Mon, 12 May 2003 15:30:11 -0600
On Monday, May 12, 2003, at 06:06 AM, Marc Weil wrote:
Why the heck is Project Builder telling me that this variable has a
correct
response from the mail server, but everything else seems to be treating
statResult as though it only contained an empty string? This is the
only
method in my program where this happens, and I do have other methods
that
issue commands to the server using EDStream and parse the response with
MOKit's MORegularExpression. It just doesn't make any sense to me!
What am I
doing wrong?
Because [_popConnection availableLine] is returning a nil value?
+stringWithString: will always return a valid string in non-exceptional
cases. Passing in nil to it isn't exceptional in this case since nil
will respond with seemingly correct answers to -length, etc. So what's
happening is you're getting a nil (or empty string back from
-availableLine) and it's happily creating an empty string from that.
On a related note, why are you using +stringWithString:? if
-availableLine returns an NSString, you can just retain that or copy it
if you need to keep it around.
Mike
_______________________________________________
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.