How to count composed characters in NSString?

2008-09-27 Thread David Niemeijer
Hi, I have been trying to find this in the documentation and list archives but without success so far. What is the best way to count the number of characters in an NSString taking account of the fact that some characters may take up multiple 16 bit slots. Using "- (NSUInteger)length" is t

Re: How to count composed characters in NSString?

2008-09-28 Thread David Niemeijer
Michael, On 28 sep 2008, at 14:41, Michael Gardner wrote: Upon further investigation, I may be wrong. I based my assertion upon Apple's NSString documentation ("Returns the number of Unicode characters in the receiver"), and upon some quick tests I ran. But this reply made me look into the

Re: How to count composed characters in NSString?

2008-09-29 Thread David Niemeijer
Hi Douglas and Peter, On Sep 29, 2008, at 6:39 PM, Douglas Davidson wrote: On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote: I need to be able to display the number of characters to the user in a way that makes sense to them. If they see 3 I should report 3. I also need it to cut-off

Re: How to count composed characters in NSString?

2008-09-30 Thread David Niemeijer
Hi Peter, On Sep 30, 2008, at 7:58 AM, Peter Edberg wrote: CFStringGetRangeOfComposedCharactersAtIndex and -[NSString rangeOfComposedCharacterSequenceAtIndex:] are the modern replacements for UCFindTextBreak with kUCTextBreakClusterMask and indeed they now are closer to the original intent

infoForBinding not working as expected

2009-02-21 Thread David Niemeijer
Hi, I have an NSImageView and in IB have set it up so that it binds on "Value Path". Everything works fine, but when I subclass NSImageView and in my subclass want to get info about the binding and use [self infoForBinding:@"Value Path"] (or when I instead have bound to "Valueurl" use [

Problems with multiple selection and NSArrayController

2008-12-10 Thread David Niemeijer
Hi, I have a master table that displays that gets it's contents NSArrayController with items. Each of those items has a categories key which contain an NSMutableIndexSet. When the user selects a row in the master table my app displays in a detailed view a detail table with categories. The

Re: Problems with multiple selection and NSArrayController

2008-12-10 Thread David Niemeijer
mplies adding a different user interface for adding categories to an item. Maybe that is the only solution or even best solution? david. Am 10.12.2008 um 11:20 schrieb David Niemeijer: Hi, I have a master table that displays that gets it's contents NSArrayController with items. Each