• 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: Debugging problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging problems


  • Subject: Re: Debugging problems
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 29 Mar 2005 00:43:17 +0200

Michael,

when I get a bit more time, I'll check the code. At quick scan, seems to me the culprit is you release anything without waiting till the task is done. Anyways...

On 29.3.2005, at 0:15, Michael Mulligan wrote:

I do, but I simply wanted to turn runs of spaces into one rather than eliminating them entirely (and tr -s makes this an easy task and required no extra coding on my part).

... well to be frank I would not call those 25-odd lines "no extra coding". If you want a pretty ugly inefficient but easy solution, what about, say


-(NSString *)removeExcessiveWhitespace {
NSString *s=[self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSArray *a;
while ([a=[s componentsSeparatedByString:@" "] count]>1) s=[a componentsJoinedByString:@" "];
return s;
}


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


  • Follow-Ups:
    • Re: Debugging problems
      • From: Shaun Wexler <email@hidden>
References: 
 >Re: Debugging problems (From: Stéphane Sudre <email@hidden>)
 >Re: Debugging problems (From: Michael Mulligan <email@hidden>)
 >Re: Debugging problems (From: glenn andreas <email@hidden>)
 >Re: Debugging problems (From: Michael Mulligan <email@hidden>)
 >Re: Debugging problems (From: Ondra Cada <email@hidden>)
 >Re: Debugging problems (From: Michael Mulligan <email@hidden>)

  • Prev by Date: Help with a NSScrollView
  • Next by Date: Re: Saving State of NSOutlineView in Document-based App
  • Previous by thread: Re: Debugging problems
  • Next by thread: Re: Debugging problems
  • Index(es):
    • Date
    • Thread