Re: Debugging problems
Re: Debugging problems
- Subject: Re: Debugging problems
- From: Ondra Cada <email@hidden>
- Date: Tue, 29 Mar 2005 00:01:38 +0200
Michael,
On 28.3.2005, at 23:53, Michael Mulligan wrote:
The line in question is an NSLog of a constant string just to indicate
to me that the code got that far (which it doesn't).
Hmmm... quite strange. Happen you perhaps use -O3 or something similar?
That would render the line numbers somewhat unreliable :)
All this method does is provide NSString a way to strip excessive
whitespace (that is, (1) leading, (2) trailing, and (3) repetitions of
whitespace in the middle of the string). I have since given up on the
third aspect of this function and commented the mystery block of code
out (it simply escapes quotes and then invokes an NSTask of: echo
somestring | tr -s '[:space:]') and now things work just fine.
Presumed you've found a block of code which, if present, definitely
causes an error, and, if commented out, the error (so far) never ever
occurred, it might be reasonable to post the block here: who knows,
perhaps there's a bug there after all, and somebody would notice. Or,
perhaps, there's a bug in Cocoa caused by the very code, and somebody
might be forewarned/forearmed :)
In the name of moving forward, I can live with extra whitespace...but
I definitely don't see what went wrong here (especially since cases it
works on and fails on don't show any real differences).
Not *exactly* what you want, but seeing you use the heavy artillery of
an NSTask for this... well, you know there's a method
stringByTrimmingCharactersInSet:, don't you? :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden